HTML · Links and media

a

Creates a hyperlink. Use real href values so links work with keyboards, middle-click and crawlers.

Syntax
<a href="…">…</a>

Example

Try it

Notes

For a new tab add target="_blank" and rel="noopener noreferrer". Never use a link for a button action.

More in this group

area audio canvas embed figcaption figure iframe img

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course