Webmasters Stack Exchange is a question and answer site for pro webmasters. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As far as I can tell, property is not a valid attribute of the <meta> tag in any of HTML 3, 4, XHTML-Transitional or XHTML-Strict. So why does the Open Graph Protocol (and Facebook's API docs) specify example code like this?

<html xmlns:og="http://ogp.me/ns#">
<title>The Rock (1996)</title>
<meta property="og:title" content="The Rock" />
<meta property="og:type" content="movie" />
<meta property="og:url" content="http://www.imdb.com/title/tt0117500/" />
<meta property="og:image" content="http://ia.media-imdb.com/images/rock.jpg" />

This doesn't validate. Changing property to name does validate, and I can verify that, at least on Facebook, it still works as intended. So why do they use property in their example code?


share|improve this question
up vote 0 down vote accepted

They define their own custom DTD (definition of DTD). This allows them to create their own extension to the HTML standard and as long as they follow their own DTD they are technically ok. It won't be valid HTML but it doesn't have to be.

share|improve this answer
Why not? How hard would it have been to do it right? – reinierpost Sep 16 '10 at 8:38
Does it have to be pure HTML to be right? – John Conde Sep 17 '10 at 11:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.