On this page
<a>
Prev: `<p>` | Up: text | Next: `<ul>`
Rel: text, Text & Lists Guide
Ref: MDN Web Docs — <a>
Tags: #public #web #html #elements #text #tier/core
Summary
Hyperlink for navigation to URLs, fragments, or files.
- Implicit ARIA Role:
link (with href) - DOM Interface:
HTMLAnchorElement - Key Attributes:
href, target, rel, download
Notes & Best Practices
- Links navigate (
href), buttons act (<button>): Never use<a href="#">for JS actions, and addrel="noopener noreferrer"when usingtarget="_blank".
Example
<a href="https://docs.python.org/3/" target="_blank" rel="noopener noreferrer">
Python 3 Docs
</a>
Linked from
Related notes
- tuts/html/elements/text/p Linked here; links to this page; shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/ul Linked here; links to this page; shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text Linked here; links to this page; shared tags: #elements, #html, #text, #web
- tuts/html/elements/text_and_lists Linked here; shared tags: #elements, #html, #web
- tuts/html/elements/text/center shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/code shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/div shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/dl shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/font shared tags: #elements, #html, #text, #tier, #web
- tuts/html/elements/text/h1 shared tags: #elements, #html, #text, #tier, #web