HTML File Paths

To get the External File on the HTML document, it is very important to know about File Locations. This is very beneficial for server-side scripting (PHP, ASP). By learning this, you will get a shortcut for your website and you will not have any problem in adding and removing the data on your website.

Following are the different types to specify file paths:

  1. <img src=”picture.png”> – To get a file from the folder containing the current file.
  2. <img src=”/picture.png”> –To get the current file from the root folder.
  3. <img src=”../picture.png”> – To get a file from Parent Folder.
  4. <img src=”https://www.example.com/img/picture.png”> – To get a file from Web Address.