u (HTML element)

Spec
Depr. Empty Version
Yes No HTML 2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

<u>
</u>

Description

The u element (short for underline) simply styles the text contained inside it with a solid underline, but it offers no semantic meaning about the text contained. It is, therefore, purely presentational in nature.

Of all the old presentational HTML elements still available, using the u element is probably the worst markup crime that you could commit. Not only is it deprecated - meaning that using it may invalidate your document (depending on the doctype specified) - but underlining text for anything other than links is generally considered very bad practice. The convention is that text inside blocks of copy which is underlined signifies a link (as in the a element); arbitrarily underling text, such as headings, will only cause the user to try clicking on it to no useful end.

In addition to possibly confusing the user into thinking that the underlined text is a link, underlining can also cause readability problems, as the line interferes with the descenders on lower case text (for example the lower case letters g, j, p, q and y), making some word shapes less clear.

The example shown would render as follows:

Example of b element

Example

An example of the deprecated u element in use (where the em or strong element would have been more appropriate):

<p>I want one of those remote controls vans. <u>How cool</u>
are they?</p>

Use this for…

Text content of any kind.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

As one of the earliest-used formatting elements, u has full browser support.

User-contributed notes

There are no comments yet.

Related Products