Anchor Tag (Link)

The <a> (anchor) element creates a hyperlink that users click to navigate to another page, file, or location. The destination is set with the href attribute.

Web

Links are the 'hyper' in HyperText — they are what connects the web together. The text between the opening and closing tags is the clickable link text.

Use target="_blank" to open a link in a new tab, and always make link text descriptive (avoid 'click here') for accessibility.

Examples

HTML

<a href="https://example.com">Visit Example</a>

Output:

Renders a blue, underlined link reading 'Visit Example' that opens example.com.

Learn it in a lesson

See also

Back to the Dictionary