CKTIS / HTML
HTML element: abbr
The abbreviation element marks an abbreviation or acronym in prose without prescribing a pronunciation or visual style.
Version: WHATWG HTML Living Standard; index snapshot date recorded separately
Syntax
<abbr title="HyperText Markup Language">HTML</abbr>abbr can have title; when present, it must contain the full expansion of the abbreviation and nothing else.
The title is optional: authors can expand a term in ordinary text at first use and omit repetition on later occurrences.
Do not rely on a mouse tooltip as the only explanation; keyboard and touch users or assistive technology might not receive it.
The example finds two abbr elements, reads the first own title, and uses textContent to show that expansion does not replace visible text.
Examples
<!doctype html>
<meta charset="utf-8">
<p><abbr id="defined" title="HyperText Markup Language">HTML</abbr> uses elements. Later, <abbr id="plain">HTML</abbr> appears without a repeated expansion.</p>
<output id="result"></output>
<script>
const terms = [...document.querySelectorAll("abbr")];
result.textContent = `count=${terms.length}; text=${defined.textContent}; expansion=${defined.title}; plainOwnTitle=${plain.hasAttribute("title")}; unchanged=${defined.textContent === "HTML"}`;
</script>
Result
count=2; text=HTML; expansion=HyperText Markup Language; plainOwnTitle=false; unchanged=true
The result verifies DOM structure and optional expansion; it does not test tooltip display or screen-reader pronunciation.