2

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>
pnuts
  • 58,317
  • 11
  • 87
  • 139
Evgeniy
  • 2,337
  • 2
  • 28
  • 68
  • In which way (which syntax?) do you use it? – unor May 26 '13 at 15:52
  • I use in meta tags dcterms:subject without the head declaration . Other way i use it, is only Schema.org.markup in the body, like . The question is the same: if using without the head namespace declaration, is the markup in the head (dc) and in the body (Schema) enough clear for search engines? – Evgeniy May 27 '13 at 20:07
  • Could you please include examples of the markup in your `head` and `body` in your question? – unor May 28 '13 at 08:38
  • added it below of the topic – Evgeniy May 29 '13 at 10:27

1 Answers1

2

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" />
unor
  • 92,415
  • 26
  • 211
  • 360
  • Thank you! Would you please point out where did you get, that the og:title is a registered HTML5 name value? – Evgeniy Jun 05 '13 at 20:19
  • It’s listed as "Registered Extension" in the [MetaExtensions](http://wiki.whatwg.org/wiki/MetaExtensions#Registered_Extensions) page I linked. See [this answer](http://stackoverflow.com/a/16207631/1591669) for the links to the relevant section in the HTML5 spec. – unor Jun 05 '13 at 20:24