HTML5 <u> Tag

The HTML <u> element is used to render text with an underline, a line under the baseline of its content. In HTML5, this element represents a span of text with an unarticulated, though explicitly rendered, non-textual annotation, such as labeling the text as being a proper name in Chinese text (a Chinese proper name mark), or labeling the text as being misspelled.

The only content permitted inside this element is Phrasing content. Both the starting and ending tag are mandatory for this element. The parent of the <u> tag can be any element that accepts phrasing content.

Just like all other pure styling elements, the <u> tag was deprecated in HTML 4. However, it was then re-introduced in HTML5 with other semantics. If you want to underline text in a non-semantic manner, you should use a <span> element, or another semantically appropriate element, and style it with the CSS text-decoration property, with the underline value.

The following style is applied to this element by default:

u {
  text-decoration: underline;

Here is an example of using this tag:

<p><u>Today's Special</u>: Salmon</p>


This element only accepts global attributes.


See the Pen HTML u Tag by Tutorialio (@tutorialio) on CodePen.

Further Reading

  1. Read more about the HTML <u> element on MDN.
  2. You can also read the HTML <u> tag reference on W3C.

Reader Comments

1. You can register or login to post a comment. Asking readers to register improves the quality of discussion.

2. As a registered user, you will also get to access features like choosing between a light and dark theme or anything else that we might implement in future.

Follow Us For Updates

Go To Top