HTML / Element / Initial coverage

The <a> Element

Status: Initial Scope: HTML Living Standard Checked: 2026-09-10

Technical Summary

An a element with an href attribute represents a hyperlink labeled by its descendant content. Without href, it represents a placeholder where a link might otherwise be placed.

The presence of the href attribute is a condition that changes the element's semantics, its interactive-content classification, and the entry point for its activation behavior.

Definition / Variants

ConditionMeaningMain consequence
href presentHyperlinkCreates a user-followable link and is classified as interactive content
href absentPlaceholderDoes not create a hyperlink and is not interactive content

The condition is whether the href attribute node is present. It should not be reduced to a simple test for a non-empty string. When present, the value must be a valid URL, potentially surrounded by spaces.

Content model

  • The content model is transparent.
  • However, an a element must not have interactive content descendants.
  • With href, it is phrasing content and interactive content.
  • Without href, it is not interactive content.

As a result, putting another link or a button inside a link creates a semantic problem even if a browser appears to handle the markup.

Main attributes and conditions

AttributeRolePoint to verify
hrefHyperlink URLIts presence selects the element variant
targetNavigable targetProcessed as a target name or keyword
downloadIntent to downloadAffects activation processing
relRelationship to the destinationIncludes link types such as noopener and noreferrer
pingHyperlink-auditing notification targetsA space-separated set of HTTP(S) URLs
hreflang / typeAdvisory language and MIME-type metadataNeither is authoritative for the fetched resource
referrerpolicyReferrer policy for following the linkConnects the element to Fetch and Referrer Policy processing

Activation behavior

For an a or area element, activation first returns if there is no href. If download is present, the user agent downloads the hyperlink; otherwise it follows the hyperlink.

if href is absent:
    return
if download is present:
    download the hyperlink
else:
    follow the hyperlink

Describing an a element merely as “an element that fires a click event” misses its URL, navigable, user-involvement, and download processing model.

DOM API

The a element is exposed as HTMLAnchorElement and can use the hyperlink URL API. Properties such as origin, protocol, host, pathname, search, and hash represent parts of the element's associated URL.

const link = document.querySelector('a');
link.href;
link.origin;
link.pathname;
link.hash;

Fact / Evidence

Key facts are mapped to their conditions, review status, and evidence locations. Unresolved scope remains visible in the Coverage section below.

Key facts and evidence locations
TypeFactCondition / ScopeStatusEvidence
SPECAn a element with href represents a hyperlink.The href attribute node is present.ReviewedHTML Standard: links created by a and area
SPECWithout href, an a element is a placeholder and is not interactive content.The href attribute node is absent.ReviewedHTML Standard: interactive content
SPECA linked a element must not contain interactive-content descendants.href is present; the transparent content model still applies.ReviewedHTML Standard: interactive content
SPECActivation follows the hyperlink, or downloads it when the download branch applies.href is present; navigation and download are separate processing branches.ReviewedHTML Standard: following hyperlinks

Evidence

  1. HTML Standard: 4.6 Links — hyperlinks created by a/area, attributes, activation behavior, and hyperlink APIs
  2. HTML Standard: Content models — shared definitions for content models and categories
  3. HTML Standard: Interactive content — interactive-content classification

Implementation Evidence

Implementation observations are recorded separately from normative claims. Pending means that no implementation result is claimed yet.

Shared fixture / environment: Minimal fixture with anchors with and without href, a relative /target.html URL, focus, click, and a dynamically inserted script. Chrome 152.0.0.0 / Windows NT 10.0 / checked 2026-09-13.

Implementation evidence register for the a element
TypeReproducible scopeRecord requiredStatus
IMPLhref="/target.html" resolved to http://127.0.0.1:8765/target.html while getAttribute retained the relative value. The anchor without href had an empty href property and no attribute. Both were constructed as HTMLAnchorElement; focus set activeElement to with-href, and click did not navigate after preventDefault().Chrome 152.0.0.0 / Windows NT 10.0 / 2026-09-13. URL resolution, APIs, focus, and activation were observed with the minimal fixture.Reviewed
WPTTests related to hyperlink creation, activation, download, and target behaviorMapped to htmlanchorelement_getter.html, htmlanchorelement_attribute-getter-setter.html, and activation-behavior.window.js. On 2026-09-15 in Chrome 152.0.0.0 / Windows NT 10.0, the two HTML tests passed 25/25 on wpt.live. activation-behavior.window.js could not be opened by the browser runner and remains unrun.Partial (25/25 pass)
AAMIn the Chrome AX tree, the anchor with href was exposed as a link named “リンクあり”; the anchor without href was exposed as text without a link role. The linked anchor was also the focused target.Chrome 152.0.0.0 / Windows NT 10.0 / 2026-09-13. Browser AX tree observation; no assistive technology claim.Observed

Use the WPT repository for test mapping and HTML-AAM for accessibility criteria.

Coverage / Open Issues

  • CheckedElement semantics, href variants, main attributes, activation behavior, and DOM API
  • OpenAll link types, the URL Standard, Fetch, and Referrer Policy require separate Topics
  • OpenComplete ARIA and platform accessibility mapping
  • OpenThis implementation and AX observation covers one Chrome environment only. Multi-browser comparison, WPT execution, historical changes, and compatibility data remain unregistered.

This page is initial coverage. It does not claim that every fact about the HTML a element has been verified.

Related surface

For a beginner-friendly minimal example and the distinction between links and buttons, see the a element page in Yugien. For button type states and form processing, see the button element in Atlas.