Monday, April 23, 2012

Can I add Microdata from HTML5 to a XHTML Strict site and still be compliant?

I've got a site coded in XHTML 1.0 Strict. I want to use the new Microdata to add breadcrumbs to my site (so Google will understand them).

My old non-microdata marked-up breadcrumbs look like this:

<li><a href="...">Level 1</a></li>
<li><a href="...">Level 2</a></li>
<li><a href="...">Level 3</a></li>

According to Google, to markup breadcrumbs using Microdata, you extend the above code like this:

<li itemscope itemtype="">
<a href="..." itemprop="url">
<span itemprop="title">Level 1</span>

But this is not valid XHTML 1.0 Strict.

What should I do?

Should I ignore the validation conflicts?

Should I write itemscope="itemscope" instead of just itemscope (this would be valid XML, but still not valid XHTML)?

Should I change the Doctype to be HTML5 instead of XHTML 1.0 Strict?

I want this to work all the way back to IE6!

Please advice :)

No comments:

Post a Comment