Hacker News new | ask | show | jobs
by phreakhead 4984 days ago
Underlines traditionally have semantically meant the same as italics. When an editor wanted the printer to make a certain word italic, he would underline it in the draft.

Really, underlines are a useless decoration. That's why HTML took them out. Not sure why they put them back in...

2 comments

The primary reason is to provide for Chinese proper name marks (where underlining has a semantic meaning) and occasionally for misspellings (in English, we'd probably add the editorial text [sic]). As a decoration, it is useless, but there are circumstances where it has semantic meaning. (The <b> and <i> tags were promoted back to respectability for the same reasons, since using <em> for text that is not stressed or <strong> for text that would traditionally be bolded without implying extra importance is just as semantically incorrect as using <i> and <b> for stress and importance would be. Arbitrary spans don't imply any semantic meaning. Where I would have used <span class="foreign" lang="fr"> previously, I'd now use <i class="foreign" lang="fr">. The <i> tag marks the text as special rather than just arbitrarily styled.)
> The primary reason is to provide for Chinese proper name marks

That's an improper use, you want {COMBINING LOW LINE} U+0332 for that.

Like you said, they are a decoration. When handwriting something, some people use underlines for different kinds of emphasis. Those people want to make text look a certain way. It's good that HTML5 brought back underlines, just in case someone wants to use them, they at least have the option.