Reputation: 11
I am looking for something, like a good starting point for this question:
Which DOCTYPE should be used when I use schema.org?
Until now I have changed this:
DOCTYPE html PUBLIC "- // W3C // DTD XHTML 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" into this:
DOCTYPE html PUBLIC "- // W3C // DTD XHTML + RDFa 1.0 // EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd"
But, what would be best practice here?
Upvotes: 0
Views: 1434
Reputation: 1696
That was before XHTML5. If you prefer xml over html, start with xml declaration and serve content with MIME type application/xhtml+xml Particularly remember using < link rel="profile" href="http://www.w3.org/1999/xhtml/vocab"/> so user-agent web-browser will know to use new initial context, that, to date has never required separate rel="profile" for RDFa. Without new initial context, older doctype technique should work with quirks. For schema.org, prefix schema is predefined by RDFa initial context http://www.w3.org/2011/rdfa-context/rdfa-1.1 while schema.org documentation misleads into using microdata instead of RDFa. Schema helps search engines indexing aspects besides domain-specific ones, such as about page and web page with greater depth than markup tags.
Upvotes: 0
Reputation: 940
schema.org doesn't explicitely recommend a doctype. I'd recommend to switch to an HTML5 doctype:
<!DOCTYPE html>
It will be compatible with both microdata and RDFa 1.1 syntaxes which are useful for schema.org integration. (microdata is currently the only one shown in the examples though).
Upvotes: 3