<u> (underline) Element
In HTML4 the
<u> element was deprecated for two very good reasons.
- Firstly, as it had no structural meaning it conflicted with the separation of page content from page presentation and displaying underlined text was more the function of CSS than HTML.
- Secondly, underlining text is an internationally known method of telling the user that it is a hyperlink which can be clicked to take you to another page or resource. Underlining something without it being a link would be confusing and could quite possibly make a visitor think that it was a broken link - not good.
So why is
Even with these good reasons for not keeping it as part of the language the
<u> element has been brought back in HTML5. Its function is to represent text that would be
underlined in normal usage in a book or other written work and the examples given by the W3C are to show a Chinese proper name (in Chinese) and to illustrate misspelt words, no added
importance or emphasis is conveyed by using the
It is possible that you may need to edit Chinese text but to me this seems a very specific function which would have been better dealt with by a new element. As for misspelt words,
people don't normally put them on the web and, if you need to, then using
<u> to illustrate this visually seems to go against the HTML for structure and CSS for visual presentation rule.
It is also true that the most popular everyday use for underlined text on the Web is to add emphasis which goes against its desired role in the HTML5 specification. In this respect
<u> element with a different meaning seems to be going against the tide because the majority of sites
containing underlining won't be using it as specified in HTML5 - making all these sites non conforming - which surely isn't the desired effect.
Overall it is my personal opinion that underlining anything that isn't a link is misleading, could be confusing and should be avoided, but it is now part of HTML5 so developers need to be aware of its meaning in the specification and should feel free to use it if they wish and if it works for them.