Is it possible to use the same meta tag for opengraph and schema.org

HTML+RDFa 1.1 and Microdata extend HTML5’s meta element.

HTML+RDFa 1.1 (W3C Recommendation) defines:

If the RDFa @property attribute is present on the meta element, neither the @name, @http-equiv, nor @charset attributes are required and the @content attribute MUST be specified.

Microdata (W3C Note) defines:

If a meta element has an itemprop attribute, the name, http-equiv, and charset attributes must be omitted, and the content attribute must be present.

That means:

  • It’s not allowed to use Microdata’s itemprop attribute together with HTML5’s name attribute.

  • It’s allowed to use RDFa’s property attribute together with HTML5’s name attribute:

    <meta name="description" property="og:description" content="great description" />
    

    (possibly an issue with having this in the body instead of the head)

  • It seems to be allowed to use Microdata’s itemprop attribute together with RDFa’s property attribute if HTML5’s name attribute is not provided:

    <meta itemprop="description" property="og:description" content="great description" />
    

    (but the W3C Nu Html Checker reports an error)

Leave a Comment