HTML XHTML The Complete Reference
home » reference » appendix a » html element reference

<u> (Underline)


This element is used to indicate that the enclosed text should be displayed underlined.

Syntax (Transitional Only)


<u
class="class name(s)"
dir="ltr | rtl"
id="unique alphanumeric string"
lang="language code"
style="style information"
title="advisory text"
</u>

Attributes Defined by Internet Explorer


accesskey="key" (5.5)
contenteditable="false | true | inherit" (5.5)
hidefocus="true | false" (5.5)
language="javascript | jscript | vbs | vbscript" (4)
tabindex="number" (5.5)
unselectable="on | off" (5.5)

Standard Event Attributes


onclick, ondblclick, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup

Events Defined by Internet Explorer


onactivate, onbeforeactivate, onbeforecopy, onbeforecut, onbeforedeactivate, onbeforeeditfocus, onbeforepaste, onblur, oncontextmenu, oncontrolselect, oncopy, oncut, ondeactivate, ondrag, ondragend, ondragenter, ondragleave, ondragover, ondragstart, ondrop, onfocus, onfocusin, onfocusout, onhelp, onlosecapture, onmouseenter, onmouseleave, onmousewheel, onmove, onmoveend, onmovestart, onpaste, onpropertychange, onreadystatechange, onresize, onresizeend, onresizestart, onselectstart, ontimeerror

Examples


Here is some <u>underlined text</u>.

Be careful with <u>underlined</u> text; it looks like
<a href="http://www.yahoo.com/">links</a>.

Compatibility


HTML 3.2, 4, 4.01 (transitional), XHTML 1.0 (transitional)
Internet Explorer 2, 3, 4, 5, 5.5, 6
Netscape 3, 4, 4.5-4.8, 6, 7
Opera 4-7

Notes


This element has been deprecated by the W3C. Under the strict HTML 4.01 specification, the <u> element is not defined. The capabilities of this element are possible using style sheets.

Underlining text can be problematic because it looks similar to a link, especially in a black-and-white environment.

(X)HTML Elements
CSS Properties
Previous: tt Next: ul
< Home | About | Chapters | Examples | Errata | Reference | Site Map >