<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.
|Content:||Inline, and text|
|Start/End Tag:||Start tag: required, End tag: required|
|Version:||HTML 3.2, 4, 4.01, 5|
<u> tag was deprecated in HTML 4, but it has been redefined in HTML5. However, it is better to avoid using this tag for underlining the text, because a user might confuse it with a hyperlink.
The basic syntax of the
<u> tag is given with:
The example below shows the
<u> tag in action.
ExampleTry this code »
<p>Here is some <u>underlined text</u>.</p>
<p>Here is some <span style="text-decoration:underline;">underlined text</span>.</p>
<u> tag doesn't have any specific attribute.
Like all other HTML tags, the
<u> tag supports the global attributes in HTML5.
<u> tag also supports the event attributes in HTML5.
<u> tag is supported in all major modern browsers.