The <u> element is used to mark HTML text to be displayed with a non-textual annotation. The default rendering of this tag is a simple solid underline, but it may be altered using CSS.

Note: Original legacy usage of this tag was just to underline text, but it should now be avoided for solely styling text. Modern best practice to use CSS for text formatting. The CSS element used for underlining text is text-decoration.


<!-- Text that should be annotated goes here -->

The <u> element should only contain text content or other tags meant for text content.


<p>You can use this tag to indicate things such as <u>mispelt</u> words.</p>
Edit this page on GitHub


Interested in helping build Docs? Read the Contribution Guide or share your feedback form.

Learn HTML on Codecademy