u – annotated text
<u>…</u>
Text with an unarticulated annotation – marked to set it apart, but with no further meaning. Typically a spelling mistake in a sample of text or proper names in Chinese text. The browser underlines it.
- Default display:
display: inline - End tag: required
- Content: phrasing content
- Where it can be used: anywhere phrasing content is allowed
- DOM interface:
HTMLElement
Attributes
Only global attributes.
Examples
A mistake in the text marked with a red wavy line:
<p>She wrote: We bake fresh bread <u class="error">evry</u> morning.</p>
.error {
text-decoration: underline wavy #d32f2f;
}
Things to watch out for
- Visitors confuse underlined text with a link. For emphasis there is
emorstrong, for the title of a workcite, for a highlightmark. - Do not use
ujust for the underline – the look is a job fortext-decoration.
Browser support
Baseline – widely available: works in all major browsers and has for a long time (since 2015 at the latest). Since version: Chrome 1, Firefox 1, Safari 1. As of October 2026 (MDN browser-compat-data).
Related:
mark – highlight
em – emphasis
s – text that is no longer accurate
ins – inserted text
span – generic inline element