HTML Tags

HTML <a> Tag

The tag, also known as the anchor tag, is used to create hyperlinks in HTML.
It allows users to navigate between web pages, jump to specific sections, download files, or even send emails using mailto: links.
It is one of the most important elements for web navigation and interconnectivity.

Syntax

Attributes

AttributeDescription
hrefSpecifies the destination URL or resource to link to.
targetDefines where to open the linked document (_self, _blank, _parent, _top).
titleDisplays additional information when the user hovers over the link.
downloadInstructs the browser to download the linked file instead of navigating to it.
relSpecifies the relationship between the current document and the linked document (e.g., nofollow, noopener, noreferrer).
idUnique identifier for the link.
classCSS class for styling the link.
styleInline CSS styling for the link.

Example

Output

Browser Output

Browser Support

Chrome
Edge
Firefox
Safari
Opera
IE9+
YesYesYesYesYesYes

The links appear as clickable text, styled according to your CSS.
Hover effects, file download, and email actions work as expected.

Notes

Conclusion

The tag enables hyperlinking and navigation, connecting web pages, files, and resources seamlessly.
It is the backbone of web navigation, making content interactive and interconnected.