Links are defined with the <a> tag. The href attribute specifies the destination URL.
HTML Links
1) Basic Link
<a href="https://www.codingwithsonu.com">
Visit Codingwithsonu
</a>
2) Absolute vs Relative Links
<!-- Absolute URL (full path) -->
<a href="https://www.google.com">Google</a>
<!-- Relative URL (relative to current site) -->
<a href="about-me.php">About Me</a>
3) Open in New Tab
<a href="https://youtube.com"
target="_blank">
Visit YouTube
</a>
4) Link with Title
<a href="privacy-policy.php"
title="Read our Privacy Policy">
Privacy Policy
</a>
5) Email & Phone Links
<a href="mailto:codingwithsonu@gmail.com">
Send Email
</a>
<a href="tel:+911234567890">
Call Us
</a>
6) Internal Page Anchors
<a href="#section2">Go to Section 2</a>
<h2 id="section2">Section 2 Content</h2>
Section 2 Content
Tip: Always use descriptive link text. Instead of “click here”, write “Read our Privacy Policy” for better accessibility and SEO.