Absolute Path

An absolute path in HTML specifies the complete address or location of a file or resource on the web:

  <img src="https://example.com/images/image.jpg" alt="Description">
  

In this example:

  • src="https://example.com/images/image.jpg" is an absolute path.
  • The image image.jpg is located at https://example.com/images/.

Relative Path

A relative path in HTML specifies the path to a file or resource relative to the current location of the HTML file:

  <img src="images/image.jpg" alt="Description">
  

In this example:

  • src="images/image.jpg" is a relative path.
  • The image image.jpg is located in the images folder relative to the location of the HTML file.