<u> represents text with a non-textual annotation, such as a spelling-error mark. Modern HTML gives it this meaning; it is not a general command to underline text.
Annotate a spelling mistake
The visible explanation identifies the error even when the wavy line cannot be seen.
HTML and CSS
HTML
<p>Spelling example: <u>recieve</u>. The correct spelling is “receive.”</p>
CSS
u {
text-decoration: underline wavy #b91c1c;
text-underline-offset: 0.2em;
}
Edit HTML or CSS to update the preview as you type. Copy code snippet copies the selected tab. Preview spacing and font defaults are not included.
Content and presentation
U accepts phrasing content and global attributes. Its usual solid underline can resemble a link, so use a distinct presentation and clear context. Do not make important annotations depend only on color or a line style.
For an underline with no annotation meaning, use text-decoration. Use cite for a work title, em for stress, or strong for importance.
Inspect the distinction
Remove the CSS. The browser may draw a simple underline, but the surrounding sentence still explains the correction. A <u> element does not provide an automatic spelling checker or an editable correction interface.
Sources and browser support
MDN: u describes the syntax and links to the specification and compatibility data. Check individual values in that table when supporting older browsers.