Hyperlinks (links) are the foundation of web navigation. They allow users to jump between web pages, access resources, or trigger downloads. The <a> element defines a hyperlink in HTML. Understanding links is critical for creating functional and accessible websites.
The basic structure of an HTML link:
<a href="https://www.example.com">Visit Example</a>
The href attribute specifies the URL of the page or resource to link to.
mailto:.tel:.| Attribute | Description |
|---|---|
href |
Specifies the destination URL of the link. |
target |
Specifies where to open the link. E.g., _blank opens in a new tab. |
rel |
Defines relationship between the current and linked document (e.g., noopener for security). |
download |
Instructs the browser to download the linked resource. |
1. External Link in New Tab:
<a href="https://www.example.com" target="_blank" rel="noopener noreferrer">Visit Example</a>
2. Internal Page Link:
<a href="about.html">About Us</a>
3. Anchor Link:
<a href="#contact">Go to Contact Section</a>
...
<h2 id="contact">Contact Us</h2>
4. Email and Phone Links:
<a href="mailto:info@example.com">Send Email</a>
<a href="tel:+911234567890">Call Us</a>
rel="noopener noreferrer" when using target="_blank".
HTML links (<a>) are essential for web navigation. Understanding attributes, link types, and best practices ensures your website is functional, accessible, and SEO-friendly.
Help others discover Technorank Learning by sharing your honest experience.
Your support inspires us to keep building!