This code is for HTML5:
<time itemprop="datePublished" datetime="2012-01-07T07:07:21+00:00">January 7, 2012</time>
Can I use this code for HTML4?
<div itemprop="datePublished">
<span dateCreated="2012-01-07T07:07:21+00:00">January 7, 2012</span>
</div>
Or something like this?
Assuming the top line is correct, you can just swap time for span, leaving the rest alone.
Where are you using HTML that the parser breaks on additional attributes/elements?
Note that Microdata is specified for HTML5, not for HTML 4.01 (related question). If you don’t care about that:
HTML 4.01 doesn’t define a
dateCreated
attribute for thespan
element. There is also notime
ordata
element defined. Some would misuse theabbr
element, but I wouldn’t recommend that. So you’d probably have to use aspan
element, and, ugly, hide the machine-readable date for your visitors.But better don’t use Microdata in HTML 4.01 documents in the first place. You could use RDFa instead (you can also use the Schema.org vocabulary in RDFa).