Horje
How to relative File Paths

A relative file path points to a file relative to the current page.

 


Full Example of relative File Paths

In the following example, the file path points to a file in the images folder located at the root of the current web:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Using a Relative File Path</h2>
<img src="https://itupto.com/avatar.png" alt="Profile" style="width:300px">

</body>
</html>

Output should be:

Full Example of relative File Paths

In the following example, the file path points to a file in the images folder located in the current folder:
 <img src="/images/picture.jpg" alt="Mountain"> 

In the following example, the file path points to a file in the images folder located in the folder one level up from the current folder:
 <img src="../images/picture.jpg" alt="Mountain"> 




Related Articles
What is HTML File Paths HTML File Paths
What does mean HTML File Paths HTML File Paths
How to create HTML Absolute File Paths HTML File Paths
How to relative File Paths HTML File Paths

Single Articles
Full Example of relative File PathsHTML File Paths

Read Full:
HTML File Paths
Category:
Web Tutorial
Sub Category:
HTML File Paths
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
2
Ref on:
View



Share on: