You are on page 1of 10

HTML File paths

Types of File Paths


1. Relative File Paths
2. Absolute File Paths
Relative File Paths
It describes the path of the file
relative to the location of the
current web page file.
<img src=“img.jpg">
The code above means the file is in the same
folder

code File
<img src="images/img.jpg">
The code above means the folder(images)
Is located in the folder the html/css file is saved in

Code File
<img src="../img.jpg">
The code above means that the image is in the parent
folder the HTML/CSS is saved in

Code File
Absolute File Paths
It describes the full
address(URL)/location to
access an internet/your file.
Instructions to a absolute file path

1. Rightclick the file you want to add an absolute


file path to
2. Open Properties
3. Copy the location of the file
4. Paste it into your code
Question Time
Made by - Mayank

You might also like