DAVID  BYRDEN

LEGAL SEO EXAMPLE graphics
 
 

Adding OGP metadata to your page

Adding OGP metadata to your page

Facebook uses the Open Graph Protocol for metadata, so it's relatively simple for you to write.

OGP metadata goes in the <head> element of your web page. This element doesn't appear on the screen, but it contains information about your page. The Open Graph Protocol adds several <meta> elements to it. Here's an example:

<meta property="og:title" content="The thing I'm writing about" />

The values for 'property', such as "og:title", are names in XML namespaces. You'll have to declare those namespaces. Look at Facebook's worked example.

Finally, if you want a valid page, you'll have to change your DOCTYPE to HTML+RDFa.

Why do Facebook want metadata in your page?

What is a valid document type for OGP metadata?

What is a canonical URL? I need it for og:url.

 
 
valid XML
valid CSS
Copyright © David Byrden 1997-2011