Open Graph validation for HTML5

For HTML5, add this to your html element like described on ogp.me and keep your og: prefixed properties:

<!doctype html>
<html prefix="og: http://ogp.me/ns#">
<head>
     <meta property="og:type" content="website" />
     ...

For XHTML (like OP’s question), use the name attribute instead of property attribute. Facebook lint will throw a warning, but the meta value will still be recognized and parsed.

<meta name="og:title" content="Hello Facebook" />

Leave a Comment