htmlxml-namespacessemantic-markupdublin-core

XMLNS and semantical understanding by search engines


I use a bunch of semantic markup on my site, from schema.org, Dublin Core, OGP, FBML, data-vocabulary. But since I use HTML5, the W3C-validator doesn't like all of XMLNS markups, like

xmlns:schema="http://schema.org/"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:og="http://ogp.me/ns/book#"
xmlns:fb="http://www.facebook.com/2008/fbml"
xmlns:v="http://rdf.data-vocabulary.org/#"

The question is: if I don't use XMLNS (or prefix:dcterms etc), would search engines still understand the semantic of the site? Yes, Google Rich Snippets testing tool still shows all of markups … But the question still remains.

Such markup is used:

<html>
   <head>
     <meta property="og:title" content="Book-Title" />
      <meta name="dcterms.title" lang="de-DE" content="Book-Title"/>
   </head>
     <body>
      <div itemscope itemtype="http://schema.org/Book">
        <h2 itemprop="name">Book-Title</h2>
      </div>
   </body>
</html>

Solution

  • You are using three different ways to specify metadata here:

    meta-name

    Your use of Dublin Core in <meta name="dcterms.title" lang="de-DE" content="Book-Title"/> is fine as it is, because you use a registered HTML5 name value here.

    Microdata with schema.org vocabulary

    Your use of Microdata with the schema.org vocabulary is fine as it is, because you specify the full URI:

      <div itemscope itemtype="http://schema.org/Book">
        <h2 itemprop="name">Book-Title</h2>
      </div>
    

    RDFa with OGP vocabulary

    With <meta property="og:title" content="Book-Title" /> you are using the RDFa syntax (because of the property attribute), therefore you’d need to specify the URI, as og is a prefix here.

    You could use a full URI instead of the prefix, e.g.:

    <meta property="http://ogp.me/ns#title" content="Book-Title" />
    

    You could specify the prefix in the html or head element with the prefix attribute:

    <head prefix="og: http://ogp.me/ns#">
      <meta property="og:title" content="Book-Title" />
    </head>
    

    Or you may use the meta-name instead of RDFa (in the same way you used the Dublin Core dcterms.title), because og:title is a registered HTML5 name value (depends on your use case if you may want to stop using RDFa here):

    <meta name="og:title" content="Book-Title" />