CSS Font Underline

Underlining a piece of text that isn't a link is usually a bad idea, as it might confuse your visitors. But if you really have to do it, use CSS to style your text. The u tag has been deprecated in HTML5 and you should move to CSS-only design even though the standard isn't yet approved. Here is how to do it.

HTML Example:

The good way: underlined text 
The bad way: underlined text

CSS Example:

span.uline { text-decoration: underline; } 

Result:

The good way: underlined text
The bad way: underlined text

 

Share

Learn how to design amazing websites