Though never truly deprecated, the <b>
and <i>
tags have been given a rather bad name. With XHTML and rise of semantic HTML / standards, many felt as if they were deprecated, replacing them with <strong>
and <em>
as fast as they could Find and Replace.
But, as Mike Taylor suggested in a recent presentation at Time, Inc. (thank you, thank you, Alla!), and HTML5 Doctor now writes, the <b>
and <i>
are back in favor, but with a no semantic value now, just visual value. You know, bold and italic, but with no semantic meaning to the visual difference. Fascinating: they are now being allowed to visually represent the visual representation they once visually represented. :-)
So, the HTML5 Doctor post does a really great idea of clearing things up, but here’s the skinny:
- The <b> is for “a span of text offset from its surrounding content without conveying any extra importance”
- The <i> is for “a span of text in an alternate voice or mood”
- The <strong> is for “a span of text with strong importance”
- The <em> is for “a span of text with emphatic stress”
Simple, right?
Well, welcome back, <b>
and <i>!
No hard feelings, right?
Happy coding,
Atg