The title
element and the og:title
property typically don’t have the same content.
Both typically give the title of the main entity, but the title
element should provide context (e.g., the site name) in addition.
(But even if they would have the same content, it might be preferable to allow consumers getting all OGP data by parsing just the RDFa, not also the HTML.)
Let’s take this question page as example
<title>opengraph - In a website, what is the value of og:title as opposed to a plain title element? - Stack Overflow</title>
<meta name="twitter:title" property="og:title" itemprop="title name" content="In a website, what is the value of og:title as opposed to a plain title element?" />
The title
is:
opengraph - In a website, what is the value of og:title as opposed to a plain title element? - Stack Overflow
The og:title
is:
In a website, what is the value of og:title as opposed to a plain title element?
What if they are the same?
Then you could provide the og:title
property on the title
element:
<title property="og:title">…</title>
(But note that some OGP consumers might, unfortunately, not support anything else than meta
elements.)