There are two perspectives:
- What is valid RDFa?
- What do consumers (like Facebook) support?
The first one can easily be answered by checking the specifications.
The second one depends on each consumer: Is their documentation up-to-date/accurate/complete? How good are their parsers?
For consumers, it would make absolutely no sense to support only a fraction of RDFa. It’s a specification/standard for a reason. They should just use one of the many conforming RDFa parsers and work with the extracted data/triples. When they have this parsed data, then they can decide which vocabularies (like OGP or Schema.org) they support and make use of.
Ideally, they should just state which types/properties (like og:name
etc.) and which syntaxes (like RDFa) they support, not just provide "definitions" by showing some markup snippets, where it’s not clear if these are just examples or if they have to be used exactly like that.
So unless their documentation is clear and/or they provide an up-to-date testing tool, you’d have to test it for or ask each consumer you are interested in.
From the HTML5+RDFa perspective …
Using RDFa’s property
attribute on the title
element is fine:
<title property="og:title">My favorite books - blog.example.com</title>
It’s also allowed to use the content
attribute in addition, but it only makes sense if the title you want to use for RDFa is not identical to the user-visible title:
<title property="og:title" content="My favorite books">My favorite books - blog.example.com</title>
Using two or more properties is fine, too:
<title property="og:title schema:name">My favorite books - blog.example.com</title>
And from the RDFa perspective, it doesn’t matter on which element you specify the og:image
property, as long as it’s an element that creates a URI as value.
So using
<meta property="og:image" content="http://example.com/thumbnail.jpg" />
is not valid HTML5+RDFa (having Facebook document it like that doesn’t change this fact).
Instead, it could be, for example:
<link property="og:image" href="http://example.com/thumbnail.jpg" />
<img property="og:image" src="http://example.com/thumbnail.jpg" alt="Foo" />