Relative & Absolute Links



 

1. Relative Links:

Definition: Relative links point to a file or resource based on the current document’s location. They are typically used to link to files within the same website.

Example

<a href="about.html">About Us</a>

2. Absolute Links:

Definition: Absolute links provide the full path to a file or resource, including the protocol (e.g. http, https), domain, and path.

Example:

<a href="https://www.example.com/about.html">About Us</a>


Post a Comment

0 Comments