👀 Live Preview
See how underlined text appears in a paragraph:
Normal: This is regular paragraph text.
Underlined: This is an underlined word.
Styled: Explore our creative collection.

The <u> tag underlines text in HTML. This guide covers HTML5 semantics, syntax, styling with CSS, comparisons with similar tags, and beginner-friendly examples.
Wrap text between <u> opening and closing tags.
Unarticulated annotations—not general emphasis.
Pick the right tag for your content type.
Control underline color, thickness, and offset.
Basic underlines, styled text, and annotations.
Avoid confusion with links and over-underlining.
<u> Tag?The <u> element is an inline HTML tag that renders enclosed text with an underline. In HTML5, it represents an unarticulated non-textual annotation—text marked for a reason that is not spelled out in the content itself.
Do not use <u> just to make words stand out. Use <em> for stress, <strong> for importance, and <ins> for inserted text during editing. Reserve u for annotations like misspelling marks or proper-name conventions in East Asian typography.
Browsers apply a default underline to <u> content. You can customize the appearance with CSS text-decoration properties while keeping the semantic meaning intact.
<p>You misspelled <u>recieve</u> — the correct spelling is <em>receive</em>.</p>Enclose the text you want underlined between opening and closing <u> tags:
<u>Underlined Text Here</u><u> is an inline element—it nests inside paragraphs, headings, and lists.<u />) is not valid in HTML.| Use Case | Code Snippet | Notes |
|---|---|---|
| Basic underline | <u>text</u> | text (default underline) |
| Colored underline | style="text-decoration-color: #007bff;" | colored |
| Thick underline | text-decoration-thickness: 2px | thick |
| Spelling mark | <u>misspelled</u> | misspelled |
| Attributes | Global only | class, id, style |
<u> vs <ins> vs <em>These tags can all affect how text looks, but each carries a different meaning:
| Element | Meaning | Best for |
|---|---|---|
<u> | Unarticulated annotation | Spelling marks, proper-name conventions |
<ins> | Inserted text | Document revisions and edit tracking |
<em> | Emphasized stress | Words spoken with emphasis |
<strong> | Strong importance | Warnings and key instructions |
<a> | Hyperlink | Navigation—already underlined by default |
Modern CSS gives you fine control over underline appearance:
.fancy-underline {
text-decoration-color: #ef4444;
text-decoration-thickness: 2px;
text-underline-offset: 3px;
}
.spell-mark {
text-decoration-style: wavy;
text-decoration-color: #dc2626;
}For purely decorative underlines with no semantic meaning, a <span> with CSS is also acceptable.
The <u> tag has no tag-specific attributes. Global attributes and CSS control styling:
class / id GlobalApply reusable underline styles via CSS classes.
<u class="fancy-underline">style InlineQuick one-off underline color or thickness.
style="text-decoration-color: #007bff;"Avoid presentational attributes removed from HTML5. Use CSS for all visual underline customization.
Three practical patterns from basic underlines to styled text. Remember: in HTML5, use u for annotations—not general emphasis.
See how underlined text appears in a paragraph:
Normal: This is regular paragraph text.
Underlined: This is an underlined word.
Styled: Explore our creative collection.
Combine a CSS class with inline text-decoration-color for a custom underline color.
<u class="highlight" style="text-decoration-color: #007bff;">Styled Underline Text</u>Basic underlining patterns plus the proper HTML5 spelling-annotation use case.
Underline a single word inside a sentence. For emphasis, prefer <em> or <strong> instead.
<p>This is an <u>important</u> message.</p>Apply a CSS class to control underline color and thickness for visually distinct text.
<style>
.fancy-underline {
text-decoration-color: red;
text-decoration-thickness: 2px;
}
</style>
<p>Explore our <u class="fancy-underline">creative</u> collection.</p>This is the intended HTML5 use: mark a misspelled word with u and explain the correction nearby.
<p>
You misspelled <u>recieve</u> — the correct spelling is <em>receive</em>.
</p>Underlined text needs careful use so readers are not confused:
em, strong, or ins when meaning mattersMark words that carry an unarticulated annotation or need an underline.
Default user-agent styles add text-decoration: underline to the content.
Developers override color, thickness, and offset with modern CSS properties.
Use u when the underline carries meaning—not just decoration.
The <u> tag is a standard HTML element with universal browser support.
All major browsers render <u> with a default underline. CSS decoration properties are also widely supported for custom styling.
Bottom line: Use <u> with confidence across all browsers your users run today.
The <u> tag underlines text in HTML. In HTML5 it represents unarticulated annotations—not general emphasis. Use it for spelling marks and typographic conventions, style underlines with CSS, and reach for <em>, <strong>, or <ins> when semantics matter more than appearance.
u for unarticulated annotations (spelling marks, proper names)text-decoration propertiesem or strong for emphasis and importanceins for text inserted during editingu as a general emphasis or highlight toolu with ins for revision tracking<u>Bookmark these before you underline your next paragraph.
<u> renders text with a default underline.
Represents unarticulated annotations—not general emphasis.
EssentialControl color, thickness, and offset with text-decoration.
Each tag has a distinct semantic purpose.
ComparisonAvoid confusion with links and over-underlining.
A11y<u> element represents text with an unarticulated non-textual annotation. Browsers render it with an underline by default.<em> for stressed emphasis and <strong> for strong importance. The u tag is not a general emphasis tool.ins marks text inserted during editing. u marks unarticulated annotations that are not insertions.text-decoration-color, text-decoration-thickness, text-underline-offset, and text-decoration-style.u element is fully supported in all modern browsers and Internet Explorer.Practice the <u> tag and custom underline styles in the Try It editor.
5 people found this page helpful