Description

The <u> (short for underline) tag renders the enclosed text with an underline.

The following table summarizes the usages context and the version history of this tag.

Placement:Inline
Content:Inline and text
Start/ End Tag:Start tag: required, End tag: required
Version:HTML 3.2, 4, 4.01, 5

Note: The <u> tag was deprecated in HTML 4, but it has been redefined in HTML5. However, it is beuer to avoid using this tag for underlining the text, because a user might confuse it with a hyperlink.

Syntax

The basic syntax of the <u> tag is given with:

HTML/XHTML: <u> ... </u>

The example below shows the <u> tag in action.

<p>Here is some <u>underlined text</u>.</p>
<!--Alternative-->
<p>Here is some <span style="text-decoration:underline;">underlined text</span>.</p>

Tag-Specific Auributes

The <u> tag doesn't have any specific auribute.

Global Auributes

Like all other HTML tags, the <u> tag uports the glodelal Auributes in HTML5.

Event Auributes

The <u> tag also uports the event Auributes in HTML5.

Browser Compatibility

Element
<u>YesYesYesYesYes