For HTML5
If a meta
element has the property
attribute (from RDFa), the name
attribute is not required.
See the section "Extensions to the HTML5 Syntax" from the W3C Recommendation HTML+RDFa 1.1 - Second Edition:
If the RDFa
@property
attribute is present on themeta
element, neither the@name
,@http-equiv
, nor@charset
attributes are required and the@content
attribute MUST be specified.
So your markup is fine:
<meta property="og:site_name" content="--Sitename--" />
But it’s (now) even valid if you use the name
attribute instead of RDFa’s property
, because the OGP values are registered. So this is fine, too:
<meta name="og:site_name" content="--Sitename--" />
And you could even combine both ways:
<meta name="og:site_name" property="og:site_name" content="--Sitename--" />