Hacker News new | past | comments | ask | show | jobs | submit login

I think this is a bit confused? <span style="font-weight:bold">bold text</span> would be appropriate for a span of text that is to be set in bold for no semantically-relevant reason, otherwise you would use something like <strong class="important">this (please read carefully!)</strong>, and then use CSS to style the "important" class as bold. The <b> tag has actually been revived, but it is reserved for a span of text that is to be clearly set apart from its surroundings for some semantic reason unrelated to emphasis, importance or anything that's covered by other HTML tags or features.



<span style="font-weight:bold"> is not invalid from a literalist perspective. It will still be bold.

Semantic markup is nice, but 'div/span soup' is still very popular and isn't technically incorrect.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: