Underlining HTML Text

Historically there was an HTML underline tag, which was used much like the bold (<b>) and italic (<i>) tags.

Here’s how the underline tags have been used:

Example text with an <u>underlined</u> word

Example text with an underlined word

The default CSS styling for the underline <u> tag is to add an underline, as shown above.

To underline a section of website content using CSS, for example underlining the class of uline.

.uline {

  text-decoration: underline;

}

I have also seen content editors implement the underline not with the addition of the <u> using the above CSS with a <span> HTML tag and appropriate style settings. for example

<span style="text-decoration:underline">Underlined text</span>

References

W3 Schools: HTML <u> tag

W3 Schools CSS text decoration