liveBook · Manning

U element

As explained in Web Design Playground, Second Edition

The HTML u element marks a span of text with an explicitly rendered non-textual annotation, commonly producing an underline.

The HTML <u> element marks text with an explicitly rendered non-textual annotation. In practice, browsers underline it—an unfortunate design choice because visitors may mistake it for a link. section 16.1

For emphasis, use <em> instead. The <u> element has no useful role here, so treat it as something to recognize in existing markup rather than reach for in new code. section 16.1

A misleading underline

This is a really bad idea: <u>looks just like a link</u>. The browser underlines the text, but clicking it does nothing. section 16.1

It's a really bad idea to use the <code>u</code> element because its text <u>looks just like a link</u>.

See the compact example showing why underlined <u> text can be mistaken for a link. section 16.1

How Web Design Playground, Second Edition covers it

How deep it goes
Defines the element’s vague annotation meaning and browser rendering, but develops no practical semantic use.
Examples
Uses underlined text that looks like a link but does nothing when clicked.
What you can do after
Evaluate existing markup and avoid choosing <u> when emphasis or link-like styling could confuse visitors.
How it connects
Contrasts the <u> element with the <em> element and HTML links through their rendered appearance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Web Design Playground, Second Edition. The section links point to the parts of the book it draws on.