Text Code

HTML Underline Code

Two ways to underline text: the <u> tag for quick markup, or CSS text-decoration for more control.

Live Tool
underline.html Live

          
Preview

1How To Use

Follow these steps — no coding experience needed.

  1. Copy the codeThe tag is the simplest option for a plain underline.
  2. Need more control?Use the CSS version to adjust thickness, colour or style (wavy, dotted).
  3. Removing underlines?See the dedicated Remove Underline page for links.

2Example Output

What this code looks like once it's on a real page.

Please read the terms and conditions before continuing.

3Browser Compatibility

BrowserSupportNotes
Chrome✓ SupportedFull support
Firefox✓ SupportedFull support
Safari✓ SupportedFull support
Edge✓ SupportedFull support
Opera✓ SupportedFull support
Mobile browsers✓ SupportedFull support, iOS & Android

Supported in every current browser — Chrome, Firefox, Safari, Edge and Opera all render this identically, on both desktop and mobile.

Related Pages

More tools that pair naturally with this one.