An HTML file path is used to specify the locationof a file
in a website's project folder. These file paths act as an address of the file for web browser when it
renders the webpage on the screen. The src or href attribute requires a value that links any
external file to HTML file.
We can link various resources in our HTML file with the
help of HTML file paths, such as:
Images
CSS files
JS files
Videos
Some other HTML documents, etc.
There are two types of file paths:
Absolute File Paths
Relative File Paths
Absolute File Paths
Absolute File Path specifies full URL to an image or a
file.
Relative File Path refers to a file path relative to the
current page or directory you are in. Some examples and cases which will let you understand this concept
are mentioned below.
When image or some other file is located in the current working directory.
Example:
<img src="picture1.jpg" alt="Book">
When image or some other file is located in images or some other folder in the current working directory.