Nov
3

HTML File Paths

11/03/2022 12:00 AM by Publisher in Web_development


File Path Examples

Path Description
<img src="image.png"> The "image.png" file is located in the same folder as the current page
<img src="pictures/image.png"> The "image.png" file is located in the images folder in the current folder
<img src="/pictures/image.png"> The "image.png" file is located in the images folder at the root of the current web
<img src="../image.png"> The "image.png" file is located in the folder one level up from the current folder

 

HTML File Paths

A file path describes the location of a file in a web site's folder structure.

File paths are used when linking to external files, like:

  • Web pages
  • Images
  • Style sheets
  • JavaScripts

 

 

Absolute File Paths

An absolute file path is the full URL to a file:

Example

<img src="https://www.webmastertool.org/pictures/image.png" alt="File Path">

leave a comment
Please post your comments here.