🔒 EXCLUSIVE: TR/html/textlevel semantics.html - High Quality
HTML
Living Standard — Last Updated 17 December 2025
- 4.5 Text-level semantics
- 4.5.1 The
aelement - 4.5.2 The
emelement - 4.5.3 The
strongelement - 4.5.4 The
smallelement - 4.5.5 The
selement - 4.5.6 The
citeelement - 4.5.7 The
qelement - 4.5.8 The
dfnelement - 4.5.9 The
abbrelement - 4.5.10 The
rubyelement - 4.5.11 The
rtelement - 4.5.12 The
rpelement - 4.5.13 The
dataelement - 4.5.14 The
timeelement - 4.5.15 The
codeelement - 4.5.16 The
varelement - 4.5.17 The
sampelement - 4.5.18 The
kbdelement - 4.5.19 The
subandsupelements - 4.5.20 The
ielement - 4.5.21 The
belement - 4.5.22 The
uelement - 4.5.23 The
markelement - 4.5.24 The
bdielement - 4.5.25 The
bdoelement - 4.5.26 The
spanelement - 4.5.27 The
brelement - 4.5.28 The
wbrelement - 4.5.29 Usage summary
- 4.5.1 The
- 4.5 Text-level semantics
4.5 Text-level semantics
4.5.1 The a element
Support in all current engines.
Opera?Edge79+
Edge (Legacy)12+Internet ExplorerYes
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?
Support in all current engines.
Opera12.1+Edge79+
Edge (Legacy)12+Internet Explorer5.5+
Firefox Android?Safari iOS?Chrome Android?WebView Android37+Samsung Internet?Opera Android12.1+
Support in all current engines.
Opera?Edge79+
Edge (Legacy)13+Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?
Support in all current engines.
Opera12.1+Edge79+
Edge (Legacy)12+Internet Explorer5.5+
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android12.1+
Support in all current engines.
Opera?Edge79+
Edge (Legacy)18Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?
- Categories:
- Flow content.
- Phrasing content.
- If the element has an
hrefattribute: Interactive content.- Palpable content.
- Phrasing content.
- Contexts in which this element can be used:
- Where phrasing content is expected.
- Content model:
- Transparent, but there must be no interactive content descendant,
aelement descendant, or descendant with thetabindexattribute specified. - Tag omission in text/html:
- Neither tag is omissible.
- Content attributes:
- Global attributes
href— Address of the hyperlinktarget— Navigable for hyperlink navigationdownload— Whether to download the resource instead of navigating to it, and its filename if soping— URLs to pingrel— Relationship between the location in the document containing the hyperlink and the destination resourcehreflang— Language of the linked resourcetype— Hint for the type of the referenced resourcereferrerpolicy— Referrer policy for fetches initiated by the element - Accessibility considerations:
- If the element has an
hrefattribute: for authors; for implementers.- Otherwise: for authors; for implementers.
- DOM interface:
-
[Exposed =Window ]interface HTMLAnchorElement :HTMLElement { [HTMLConstructor ]constructor (); [CEReactions ,Reflect ]attribute DOMString target ; [CEReactions ,Reflect ]attribute DOMString download ; [CEReactions ,Reflect ]attribute USVString ping ; [CEReactions ,Reflect ]attribute DOMString rel ; [SameObject ,PutForwards =value , Reflect="rel"]readonly attribute DOMTokenList relList ; [CEReactions ,Reflect ]attribute DOMString hreflang ; [CEReactions ,Reflect ]attribute DOMString type ; [CEReactions ]attribute DOMString text ; [CEReactions ]attribute DOMString referrerPolicy ; // also has obsolete members };HTMLAnchorElement includes HTMLHyperlinkElementUtils ;
If the a element has an href attribute,
then it represents a hyperlink (a hypertext anchor) labeled by its
contents.
If the a element has no href attribute,
then the element represents a placeholder for where a link might otherwise have been
placed, if it had been relevant, consisting of just the element's contents.
The target, download, ping,
rel, hreflang, type,
and referrerpolicy attributes must be omitted
if the href attribute is not present.
If the itemprop attribute is specified on an a element,
then the href attribute must also be specified.
If a site uses a consistent navigation toolbar on every page, then the link that would
normally link to the page itself could be marked up using an a element:
< nav >
< ul >
< li > < a href = "/" > Home</ a > </ li >
< li > < a href = "/news" > News</ a > </ li >
< li > < a > Examples</ a > </ li >
< li > < a href = "/legal" > Legal</ a > </ li >
</ ul >
</ nav >
The href, target, download, ping,
and referrerpolicy attributes affect what
happens when users follow hyperlinks or download hyperlinks created using the a
element. The rel, hreflang, and type
attributes may be used to indicate to the user the likely nature of the target resource before the
user follows the link.
a.textSame as
textContent.
HTMLAnchorElement/referrerPolicy
Support in all current engines.
Opera?Edge79+
Edge (Legacy)?Internet ExplorerNo
Firefox Android?Safari iOS?Chrome Android?WebView Android?Samsung Internet?Opera Android?
The IDL attribute referrerPolicy must reflect the referrerpolicy content attribute, limited to
only known values.
The text
attribute's getter must return this element's descendant text content.
The text attribute's setter must string replace
all with the given value within this element.
The a element can be wrapped around entire paragraphs, lists, tables, and so
forth, even entire sections, so long as there is no interactive content within (e.g., buttons or
other links). This example shows how this can be used to make an entire advertising block into a
link:
< aside class = "advertising" >
< h1 > Advertising</ h1 >
< a href = "https://ad.example.com/?adid=1929&pubid=1422" >
< section >
< h1 > Mellblomatic 9000!</ h1 >
< p > Turn all your widgets into mellbloms!</ p >
< p > Only $9.99 plus shipping and handling.</ p >
</ section >
</ a >
< a href = "https://ad.example.com/?adid=375&pubid=1422" >
< section >
< h1 > The Mellblom Browser</ h1 >
< p > Web browsing at the speed of light.</ p >
< p > No other browser goes faster!</ p >
</ section >
</ a >
</ aside >
The following example shows how a bit of script can be used to effectively make an entire row in a job listing table a hyperlink:
< table >
< tr