HTML Tags

HTML <u> Tag

The <u> tag in HTML is used to underline text.
Originally, <u> was purely stylistic, but in modern HTML5, it can also indicate non-emphatic text that should be stylistically different, such as proper names, misspelled words, or terms needing attention.
It is an inline element.

Syntax

<u>Underlined text here</u>

Attributes

AttributeDescription
classAssigns one or more class names for styling.
idAssigns a unique identifier to the element.
styleAdds inline CSS styles to customize appearance.
titleProvides additional information as a tooltip.

Example

<!DOCTYPE html>
<html>
<head>
  <title>U Tag Example</title>
  <style>
    .underline {
      text-decoration: underline;
      color: #1a237e;
    }
  </style>
</head>
<body>
  <h1>HTML &lt;u&gt; Tag Example</h1>
  <p>
    This is an <u class="underline" id="important-word" title="Underlined Text">underlined word</u> in a paragraph.
  </p>
  <p>
    Example: Please read the <u>Terms and Conditions</u> carefully.
  </p>
</body>
</html>

Output

Browser Output

Use our TryIt Editor to see the output.

Browser Support

Chrome
Chrome
Firefox
Firefox
Edge
Edge
Safari
Safari
Opera
Opera
IE
IE9+
✅Yes✅Yes✅Yes✅Yes✅Yes✅Yes

The <u> tag visually underlines the text to make it stand out, often used for stylistic emphasis without implying semantic importance.

Notes

  • <u> is an inline element and does not create a new line.
  • Use CSS for additional styling (color, font weight, underline style).
  • In HTML5, <u> is recommended for non-emphatic stylistic text, not for emphasis (use <em> or <strong> for that).
  • Avoid using <u> purely for emphasis, as it may be confused with hyperlinks.

Conclusion

The <u> tag is used to underline text, primarily for stylistic purposes.
It visually highlights content without changing semantic meaning, making it useful for names, special terms, or visually distinct text.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend