Published by Patrick Mutisya · 14 days ago
A hyperlink (or simply a link) is an element on a web page that allows the user to jump to another location. This location can be another page, a different part of the same page, a file, an email address, or any resource that can be addressed by a URL.
<a> (anchor) element to the HTML code.href attribute of the anchor contains the destination URL.mailto:).<a> Element| Attribute | Purpose | Example \cdot alue |
|---|---|---|
href | Specifies the destination URL. | https://www.example.com |
target | Controls where the linked document opens. | _blank (new tab/window) |
title | Provides additional information shown as a tooltip. | "Visit Example.com" |
download | Instructs the browser to download the linked file. | filename.pdf |
rel | Defines the relationship between the current page and the linked resource. | noopener noreferrer |
The following code creates a link that opens the IGCSE ICT homepage in a new tab:
<a href="https://www.cambridgeinternational.org/programmes-and-qualifications/cambridge-igcse-information-technology-0417/" target="_blank" title="Cambridge IGCSE ICT">IGCSE ICT 0417</a>
Hyperlinks are the fundamental building blocks of web navigation. By using the <a> element and its attributes, authors can connect pages, resources, and actions, providing a seamless experience for users.