HTML <u> tag
Definition and Usage
<u>
The tag represents some text that is not explicitly expressed and has a different style from normal text, such as spelling errors in Chinese text or proper nouns. The content inside the tag is usually displayed in underlines. You can change this style with CSS (see the example below).
Tip:Avoid using it in places that may be mistaken for hyperlinks <u>
Element!
See also:
HTML Tutorial:HTML Text Formatting
HTML DOM Reference Manual:Underline object
Example
Use <u>
Mark the misspelled words:
<p>This is some <u>mispeled</u> text.</p>
Use CSS to set the style of spelling error text:
<html> <head> <style> .spelling-error { text-decoration-line: underline; text-decoration-style: wavy; text-decoration-color: red; } </style> </head> <body> <p>This is some <u class="spelling-error">mispeled</u> text.</p> </body> </html>
Global Attributes
<u>
The tag also supports Global Attributes in HTML.
event attributes
<u>
The tag also supports Event Attributes in HTML.
Default CSS Settings
Most browsers will display the following default values <u>
Element:
u { text-decoration: underline; }
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |