Course Content
Basic Structure of an HTML Document
0/2
HTML Attributes
0/1
HTML links and the anchor (a) tag
0/2
HTML Images and Image tag
0/1
HTML Tutorial

What is the <a> Tag?

The <a> tag (also known as the anchor tag) is used to create hyperlinks in HTML.

How to insert links in HTML?

<a href=”URL”>Link Text</a>

  • href = Hypertext REFerence, the destination you’re linking to
  • "Link Text" = what the user will click on

Attributes of the <a> Tag:

Attribute Description
href The link destination
target="_blank" Opens the link in a new tab
title Shows text on hover
download Downloads the file instead of opening it
rel="noopener noreferrer" Improves security when opening in a new tab

Example With All Features:

<a href=”https://example.com” target=”_blank” title=”Go to Example Site” rel=”noopener noreferrer”>Visit Example Site</a>