HTML <u> Element
The <u> element represents a span of inline text with a non-textual annotation. It can be used for conventions such as marking a misspelled word or annotating a proper name in Chinese text.
Syntax
<u>annotated text</u>
Attributes
The <u> element supports the global HTML attributes. It does not have any element-specific attributes.
Example
This example uses the <u> element to mark a deliberately misspelled word and uses CSS to make the annotation visually distinct.
Usage Notes
The <u> element should be used when the text has a non-textual annotation, not simply because you want text to appear underlined. Use CSS when underlining is purely a visual design choice.
Browsers commonly display <u> text with an underline by default, but its semantic meaning is not simply "underline." The element's purpose is to identify annotated text.
Avoid using <u> where its default underline could cause ordinary text to be mistaken for a hyperlink. CSS can be used to give the annotation a different visual treatment when needed.
Accessibility
Do not rely on the underline alone to communicate important information because users may interpret underlined text as a link, and the visual styling may not communicate the annotation to assistive technologies. Make sure the surrounding content provides enough context for users to understand why the text is marked.
Browser Support
Baseline: Widely available indicates a feature has been supported by core browsers for at least 30 months. At this stage, the feature is considered stable and safe for most websites to use without needing to worry about compatibility issues or fallbacks, as it is supported by the vast majority of users' devices and browser versions.
For detailed browser compatibility information, see Can I Use: HTML <u> Element .
Related Elements
The <u> element is related to other inline text elements, including <em> for stress emphasis, <strong> for strong importance, <mark> for relevant or highlighted text, and <s> for text that is no longer accurate or relevant.
Specifications
The <u> element is defined in the WHATWG HTML Living Standard .
