U - underline (Not in HTML 2.0!)
Purpose
To underline text.
Typical rendering
Underlined. However, e.g. several versions of Netscape still in use
present U elements as normal text.
See general notes on rendering markup.
Basic syntax
<U>text</U>
Possible attributes
None.
Allowed context
Text container, i.e.
any element that may contain text elements.
This includes most HTML elements. In particular,
text elements can be nested.
Contents
Text elements.
Notice that this disallows e.g. paragraph breaks.
Examples
Example U-1.html:
Compare <U>underlined text</U> with normal text.
Notes
Avoid using U; use logical markup instead.
For example, to emphasize use
EM or STRONG.
In
HTML 4.0, the U element is deprecated
.
It is customary to use underlining in typewritten text for various
other purposes than emphasis, too, but in HTML it is usually
better to use e.g. the I element (to produce italics).
One particular reason for avoiding U is that typically Web browsers
present links using underlining (instead of or in
addition to other methods such as different color). Therefore, if you use U
elements,
the reader may have serious difficulties in distinguishing them from links.
The HTML 2.0 specification does not include U but mentions it
as an element which has been "deployed to some extent".
See general notes on text markup, which
provide additional examples.
Date of last update:
2010-12-16.