<u>
Example
<p>
This is <u>very</u> important.
</p><p>
This is <em>very</em> important.
</p>Emphasis needs <em>, and underlined text looks like a link and confuses users.
Common mistakes
- Using
<u>for emphasis, so users try to click it as a link.
Key points
<u>marks a non-textual annotation, like a spelling error mark, not emphasis.- Plain underline styling uses CSS
text-decoration, not<u>. - Underlined text that is not a link is styled so it does not look like a link.
Interview questions
Is the u tag deprecated?
No, <u> is valid HTML with a narrow meaning: an unarticulated annotation, such as marking a misspelled word.
How do I underline text without u?
Use CSS text-decoration: underline, and tune it with text-underline-offset and text-decoration-thickness.