CSS: February 2008 Archives

I can't believe I just used the <u> (underline) tag!

| | Comments (0)

OK we're not supposed to the <u> (underline) tag because it confuses readers who might think an item is a link when it's not. But surprisingly...it still has it's uses.

For instance, I use the <cite> tag for book titles like Gone with the Wind. Normally the <cite> tag produces italics, but I used CSS to make my <cite> tag both bold and italicized (as in Gone with the Wind) for increased legibility (good functional reasoning here).

But suppose I need to highlight one word within the title for emphasis (e.g. It's Gone with the Wind, not Went with the Wind).

Visually I know that <cite> is already and bold and italic, but now I need to add a third visual element. My choices are 1) Use underline or 2) hack into my stylesheet for the blog and create some sort of custom <em> class or whatever (and add some serious bytes to my file). I confess I took the easy way out.

P.S. Be careful about including "<u>" in Blog titles though. You might want to use "&lt;u&gt;" instead.