<a>
The anchor element creates a hyperlink to web pages, files, email addresses, or locations within the same page.
Syntax
<a href="url">link text</a> Examples
<a href="https://example.com" target="_blank" rel="noopener">Visit Example</a>
<a href="#section-2">Jump to Section 2</a>
<a href="mailto:hi@example.com">Email us</a>
Output
Renders three clickable links: an external link opening in a new tab, an in-page jump link, and a mailto link.
Notes
Always provide meaningful link text for accessibility; avoid "click here". When using target="_blank", add rel="noopener" to prevent the new page accessing window.opener. An <a> without href is a placeholder and not focusable.
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |