HTML <u> tag

The <u> tag is used to underline text.

NOTE: The <u> tag is deprecated and will not work with the XHTML Strict document type.

Standard attributes

class, dir, id, lang, style, title, xml:lang

For more information on standard attributes, check out our HTML standard attributes reference page.

Event attributes

onclick, ondblclick, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup, onkeydown, onkeypress, onkeyup

For more information on event attributes, check out our HTML event attributes reference page.

Example

Remember that <u>shapes</u> are a very important concept in Mathematics <u>Don't underline text unless it is a link! (notice the irony?)</u>
Output:
Remember that shapes are a very important concept in Mathematics Don't underline text unless it is a link! (notice the irony?)

Tips & notes

Web users are used to associating underlined text with links so only links should be underlined on a page. Try not to use the <u> tag unless you really need to emphasize some text, and if that's the case consider another way to emphasize text like making text bold or italic.

It's better to use CSS to style text than text formatting tags like <u>.

Web Reference
  1. CSS reference
  2. RSS reference
  3. HTML reference


© Copyright 2011-2012 Landofcode.com
Terms of use | Privacy policy | Copyright information | Make a donation