HTML Underline <u> Tag

HTML <u> tag is used to define a span of inline text with a non-textual annotation. It rendered as an solid underlined text, but it can be changed using CSS properties. This tag was deprecated in HTML 4.0 and redefined in HTML5.

In HTML5, <u> tag is used to represent the text that is stylistically different with normal text.

Tips: The use of <u> tag should be ignored as it may generate confusion for a hyperlinked text.

Syntax

Following are some specifications about the HTML <u> tag

DisplayInline
Start tag/End tagStart and End tag
UsageFormatting

Examples

The following examples show the underlined tag in HTML with the animated and CSS effects.

Example 1:

The example shows the basic underline tag in html.

Output:

The output shows the wavy underline.

HTML u tag

Example 2

The following example shows the basic html underline tag.

Output:

The output shows the basic html underline tag.

HTML u tag

Example 3

The following example shows the primary HTML underline tag with the end tag.

Output:

The output shows the basic html underline tag.

HTML u tag

Example 4

The following example shows the HTML underline tag with the end tag.

Output:

The output shows the HTML underlined tag.

HTML u tag

Example 5

The following example shows the underline tag after the hover effect.

Output:

The output shows the basic html underline tag.

HTML u tag

Attribute:

Tag-specific attributes:

The <u> tag does not contain any specific attribute.

Global attribute:

The <u> tag supports the Global attributes in HTML.

Event attribute:

The <u> tag supports the Event attributes in HTML.

Supporting Browsers

Elementchrome browser Chromeie browser IEfirefox browser Firefoxopera browser Operasafari browser Safari
<u>YesYesYesYesYes

Conclusion

The underline tag is used to highlight the text in the formal method. It helps the user easily get important data or lines from a paragraph on the web page.


Next TopicHTML ul Tag