HTML5 - html, prefix and meta related

Viewed 1311

I am new to HTML5. I did some researches on prefix and OGP, but I still cannot figure out the following

<head prefix="og: http://ogp.me/ns#">
    <title>something</title>
    <meta property="og:title" content="something"/>
    <meta prefix="og: http://ogp.me/ns#" property="og:image" 
    content="http://something.com/img/social-image.png" />
</head>
  1. <head prefix="og: http://ogp.me/ns#">What's "og: http://ogp.me/ns#"? What does it do?

I found this from quora (https://www.quora.com/What-does-this-tag-mean-html-lang-en-US-prefix-og-http-ogp-me-ns), but I cannot understand it.

The Open Graph protocol enables any web page to become a rich object in a social graph. For instance, this is used on Facebook to allow any web page to have the same functionality as any other object on Facebook.

What does "become a rich object" mean?

2.Why do we need these two lines, <title>something</title> and <meta property="og:title" content="something"/>? Aren't they same?

3.Why do we need to set the meta prefix again in the third line? Didn't we do it in the head?

<meta prefix="og: http://ogp.me/ns#" property="og:image" 
    content="http://something.com/img/social-image.png" />

Thanks a lot!

1 Answers

What you're describing is called Open Graph Protocol, and it essentially means you're using that template above to turn a webpage into a graph object. You need four parts: og:title, og:type, og:url, and og:image, which are described in detail here. This is the basic metadata you need to use Open Graph Protocol - if you don't have it, Open Graph won't work.

Related