HTML Tutorial

HTML Tag: <u>

Usage:

Use the <u> tag to add a line of text that appears underlined. It draws attention to important or emphasized parts of the content.

Attributes:

  • None

Examples:

  • To underline a sentence: <u>This sentence is underlined.</u>
  • To highlight a keyword: The most <u>important</u> concept is...

HTML Example: Exploring the <u> Tag

<p>This sentence has an underlined part: <u>The underlined text</u>.</p>
<p><u>This entire sentence is underlined</u>.</p>

Accessibility and Ease of Use:

  • Using <u> for emphasis can be problematic for assistive technology users who rely on screen readers. They may misinterpret the underlined text as a link.
  • As an alternative, consider using bolder text (<b>) or italics (<i>) for emphasis. These tags do not create accessibility issues.