HTML File Paths
An HTML file path is used to describe the location of a file in a website folder. File paths are like an address of file for a web browser. We can link any external resource to add in our HTML file with the help of file paths such as images, file, CSS file, JS file, video, etc.
The src or href attribute requires an attribute to link any external source to HTML file.
Following are the different types to specify file paths:
File paths are used on webpages to link external files like:
There are two types of File Paths:
Absolute File Paths
Absolute file path specifies full URL address.
Example:Test it Now
Relative File Paths
The relative file path specifies to a file which is related to the location of current page.
Let's take an example to see how the file path points to a file in the images folder located at the root of the current web.Test it Now
This is how a file path points to a file in the images folder located in the current folder.Test it Now
When the images folder located in the folder one level above the current folder.Test it Now
Important Points for File path:
Next TopicHTML Head