Jukka K. Korpela said:
Maybe. What does underlining mean in speech, or in Braille? You mightjust as well have asked how to produce red text in XHTML Strict, or how to make some words spoken in female voice, or how to make some words have a sweet odour in XHTML Strict.
What on earth is wrong with some of you people?
The poor guy asked a really simple question. Can you underline text in XHTML strict anymore, because you COULD in HTML using the u tag.
So the answers are either.. "Yes you can, with THIS tag..." or "No you can't, but the work-around is THIS..".
The problem with some of you guys is that you're so lost in your techy world that you forget that sometimes the simplest answer is necessary and your junk-heaped replied just cause complication.
An underline CAN or
can be used to emphasise text that has a special meaning compared to it's normally non-emphasised equivalent. The problem in HTML is that hyperlinks are defaulted to underlined so there may be a slight confusion.
BUT, (
But) let's not forget that by default, hyperlinks are bright blue. So if you underline your normal text, people shouldn't be getting it confused with your default bright blue underlined hyperlink. If your underlined text is getting mixed up with your hyperlinks then that's just bad design by the developer because they've been changing colours.
Yes, italic is apparently the "best" way to emphasise text, but you will find lots of different opinions on this by academics. There is even the suggest that italic and underlined emphasis can have two different types of meaning.
But hey!, let's not get complicated.
If you want your emphasis to look underlined and not italic just use the EM tag and inside it but the class 'underline'.
Code:
<em class='underline'>My emphasised word</em>
Then, as mentioned, created a class .underlined and apply appropriate text-decoration.
That way it's coded correctly in the sense that HTML identifies this word as emphasis and it also means you get to paint it how you want.