HTML <u>

garanews's avatar
Published Mar 15, 2022Updated Oct 31, 2022
Contribute to Docs

The <u> element is used to mark HTML text to be displayed with a non-textual annotation. The default rendering of this tag is a simple solid underline, but it may be altered using CSS.

Note: Original legacy usage of this element was just to underline text, but it should now be avoided for solely styling text. Modern best practice to use CSS for text formatting. The CSS element used for underlining text is text-decoration.

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours

Syntax

<u>
  <!-- Text that should be annotated goes here -->
</u>

The <u> element should only contain text content or other tags meant for text content.

Example

<p>
You can use this element to indicate things such as <u>misspelt</u> words.
</p>

All contributors

Contribute to Docs

Learn HTML on Codecademy

  • Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
    • Includes 34 Courses
    • With Professional Certification
    • Beginner Friendly.
      115 hours
  • Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.
    • Beginner Friendly.
      7 hours