XHTML, validity <b> and <i>
Imagine my surprise, when (after getting called-out in the comments of a blog posting) the following code — with an XHTML 1.0 strict DOCTYPE no less — passed the W3C’s validation test:
<p><b><i>howdy</i></b></p>
¿Que? So to the specification I go. Sure enough, there’s no mention of either the <b> or <i> tags being so much as deprecated, let alone removed. In fact, both elements are still a part of the XHTML 1.1 presentation module.
So, as it turns out, instead of using <span class="bold"> in places where semantic validity isn’t important, you can still use <b> and <i> in your XHTML documents.
However, if you are using <b> and <i> for emphasis (rather than purely for appearances) <strong> and <em> are the way to go.
Technorati-ism: XHTML, HTML, web design, web development