DEV Community

Cover image for HTML tags | u
Carlos Espada
Carlos Espada

Posted on • Edited on

HTML tags | u

It is used to represent text that is not articulated, and therefore must be rendered in a way that indicates that it has a non-textual annotation, different from the rest of the text. This rendering is usually translated into an underline.

Examples of this can be misspelled words, spelling errors or written Chinese proper names, which need to be underlined (Ex: <p>This paragraph contains a <u>mipsselled</u> word</p>).

It should not be used for presentation purposes, to underline texts, for this the text-decoration property of CSS will be used.

It should also not be used when its default style can be confused with a link, which is also underlined by default.

<u> should be a last resort and only used when there is no other more appropriate tag available, such as <em>, <b>, <mark>, <strong>, <cite> or <i>.

To provide textual annotations, as opposed to non-textual ones created with <u>, the <ruby> tag should be used.

  • Type: inline
  • Self-closing: No
  • Semantic value: No

Definition and example | Support

Top comments (0)