HTML <u> Tag
Description
The <u>
HTML tag, short for "underline," is a deprecated HTML element used to apply underlining to text within a web page. While it was commonly used in the past to emphasize or highlight text, it is no longer considered a best practice in modern web development. Instead, CSS (Cascading Style Sheets) is now the preferred method for controlling the visual presentation of text, including underlining. Developers typically use CSS properties like 'text-decoration' to apply underlines to specific text elements, allowing for more flexibility and control over styling while separating content from presentation in accordance with web standards.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
- Inline and text
- Start/End Tags
- Start tag: required, End tag: required
Example
This is an example of <u>underlined</u> text.
Attributes
None
Global Attributes
The <u>
tag also supports the Global Attributes in HTML5
Event Attributes
The <u>
tag also supports the Event Attributes in HTML5
Browser Support
The following table will show you the current browser support for the HTML <u>
tag.
Desktop | |||||
12 | 1 | 1 | 15 | 4 |
Tablets / Mobile | |||||
18 | 4 | 14 | 3.2 | 1 | 4.4 |
Last updated by CSSPortal on: 30th September 2023