Links are seen on all web pages. Links allow users to click their way from one page to another.
Syntax:
<a href="url">link Title</a>
example
<a href="https://rathorji.in">Visit rathorji.in!</a>
Link attribute target
<a href="https://rathorji.in" target="_blank">Visit rathorji.in!</a>
target="_blank":when you click the link it will open a link in a new tab in the browser window
Output:
The target attribute has much value you can try one by one and see output:
- _self
- _blank
- _parent
- _top
Absolute URLs vs. Relative URLs
above are using an absolute URL
Now understand Relative URLs
<p><a href="home.html">Home Page</a></p>
<p><a href="about.html">About US</a></p>
Output: