Skip to main content

html-tags.com

<a>

A hyperlink — the element the web is named after.

Baseline: Widely available · Inline text semantics

When to use it

For navigation to a URL or fragment, with link text that predicts the destination; use rel to describe the relationship (external, license, author, nofollow).

When not to

Never 'click here', never href='#' as a fake button (that's button), and never a link that does nothing.

Key attributes

href
destination URL or #fragment
rel
relationship tokens
hreflang
language of the target
download
save instead of navigate

Example

MDN's HTML documentation
<a href='https://developer.mozilla.org/en-US/docs/Web/HTML' rel='external'>MDN's HTML documentation</a>
Rendered live above, source below.

Authoritative references