I'm using rich snippet in my website. Example: Consider providing Organization
schema.
Is it necessary to provide <meta property="name" content="something />
or is it enough to provide <div property="name">something</div>
?
A conforming RDFa parser will parse the whole document and take all RDFa statements into account, no matter if it’s an element in the head
or in the body
, no matter if it’s a meta
or a div
element.
These three snippets should generate the same RDF:
<html>
<head typeof="schema:Organization">
<title>Example 1: meta in the head</title>
<meta property="schema:name" content="Foobar" />
</head>
<body>
</body>
</html>
<html>
<head>
<title>Example 2: meta in the body</title>
</head>
<body typeof="schema:Organization">
<meta property="schema:name" content="Foobar" />
</body>
</html>
<html>
<head>
<title>Example 3: div in the body</title>
</head>
<body typeof="schema:Organization">
<div property="schema:name">Foobar</div>
</body>
</html>
(Google’s Structured Data Testing Tool often has some quirks, though; it might not necessarily conform to RDFa all the time. For example, it seems that Google doesn’t recognize types specified on the html
element. If you are interested in Google’s Rich Snippets/Cards, simply check your markup in the SDTT to see how it gets interpreted by Google: if your data is part of the output, you are probably fine.)