Hyperlinks are the defining characteristic of the World Wide Web. A hyperlink connects web pages to one another, allowing visitors to seamlessly navigate from their current document to another webpage, external website, file download, or specific page bookmark. The target destination is defined using a Uniform Resource Locator (URL) in the href attribute.
HTML hyperlinks can be divided into four fundamental categories:
Text Hyperlink: Standard clickable anchor text pointing to a webpage URL.
Image Hyperlink: An image wrapped in an anchor tag that triggers navigation upon being clicked.
Mailto & Tel Hyperlink: Links that trigger email clients or mobile telephone dialers.
Reference (Bookmark) Link: Internal jump links navigating directly to specific elements on the same page.
A basic text hyperlink is constructed using the <a> (anchor) tag with the href (hypertext reference) attribute:
<a href="https://veewom.com" target="_blank" rel="noopener noreferrer">Visit Veewom Homepage</a>
Rather than clicking on text, you can turn any image into a clickable button by nesting the <img> element directly inside an <a> tag:
<a href="https://veewom.com" title="Return to Veewom Home">
<img src="images/logo.png" alt="Veewom Official Logo" width="120" height="40">
</a>
Special protocol schemes allow visitors to launch native communication apps directly from a click:
<a href="mailto:info@veewom.com?cc=support@veewom.com&subject=HTML%20Tutorial%20Inquiry">
Send Us an Email
</a>
<!-- Mobile Phone Dial Link -->
<a href="tel:+919876543210">Call Student Support: +91 98765 43210</a>
<!-- Direct WhatsApp Chat Link -->
<a href="https://wa.me/919876543210?text=Hello%20Veewom" target="_blank" rel="noopener">Chat on WhatsApp</a>
To establish an internal link that smoothly scrolls to a specific location on the same page, assign an id to the destination section, and link to it using a hash symbol (#id_name):
<!-- Table of Contents at Top of Page -->
<p><a href="#viva-section">Skip to Viva Questions ↓</a></p>
<!-- Large content body in between... -->
<!-- Destination Anchor -->
<h2 id="viva-section">Viva & University Exam Questions</h2>
<p><a href="#top">Back to Top ↑</a></p>
The target attribute dictates where the linked document will open:
target="_self" (Default): Opens the linked document in the same tab or window.target="_blank": Opens the linked document in a brand new browser tab.target="_blank", always add rel="noopener noreferrer". Without this, the newly opened page gains access to your original page's window.opener object via JavaScript, exposing your site to dangerous phishing attacks known as Reverse Tabnabbing!
Search engines evaluate outgoing links to assess website trust. Follow Google's official link attribute guidelines:
| Attribute | Google Recommendation & Best Use Case |
|---|---|
rel="sponsored" |
Mandatory for paid affiliate links, advertisements, and commercial sponsorships. Prevents Google link penalties. |
rel="ugc" |
User-Generated Content. Used for links inside blog comments, discussion forums, and user profiles. |
rel="nofollow" |
Tells search engines not to endorse or pass PageRank authority to the linked webpage. |
Problem Statement: Create a webpage navigation section featuring a text link to the syllabus, an image link to the university homepage, an internal bookmark link jumping down to the contact footer, a telephone link, and a downloadable PDF syllabus button.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Hyperlink Master - BCA Practical 12</title>
</head>
<body>
<nav>
<a href="https://veewom.com" target="_blank" rel="noopener noreferrer">
<img src="images/logo.png" alt="Veewom Logo" width="100" height="35">
</a> |
<a href="#contact-footer">Jump to Contact Info</a> |
<a href="pdf/index.pdf" download="HTML_Tutorial.pdf">Download Syllabus (PDF)</a>
</nav>
<main style="margin-top: 40px;">
<h1>BCA Front-End Development Course</h1>
<p>Master hyperlinks, anchor attributes, and search engine optimization.</p>
</main>
<footer id="contact-footer" style="margin-top: 100px; border-top: 1px solid #ccc; padding-top: 20px;">
<h3>Department Contact Information</h3>
<p>Email: <a href="mailto:info@veewom.com">info@veewom.com</a></p>
<p>Helpline: <a href="tel:+919876543210">+91 98765 43210</a></p>
<p><a href="#top">↑ Back to Top</a></p>
</footer>
</body>
</html>
https://veewom.com/html/link.htm). A Relative URL points to a file relative to the current webpage location without specifying a domain (e.g., images.htm or ../css/styles.css).
download attribute instructs the browser to download the target file directly to the user's hard drive instead of navigating to it or displaying it in the browser window.
id attribute using a hashtag in the anchor's href (e.g., <a href="#faq"> navigates to <div id="faq">). The legacy <a name="..."> method is obsolete.
text-decoration: none; on your anchor selector: a { text-decoration: none; }. To restore the underline only when hovered, add a:hover { text-decoration: underline; }.