To define a link using the A element, we
- markup the source anchor within anchor tags (<a> and </a>), and
- set the value of the element’s href attribute to the link’s destination anchor.
<a href="destination anchor">source anchor</a>
The href attribute specifies the address of the destination anchor with a Universal Resource Identifier, or URI.
The source anchor is what a user interacts with. Browsers normally render the source anchor in such a way as to indicate the presence of a link, e.g., by underlining the content.
We commonly use the A element to:
- link to another hypertext document, or
- link to a specific location within the same, or another, hypertext document