Why is a meta tag property og:url useful and how do you use it?

Experience Level: Medior
Tags: HTMLOpen Graph Protocol

Answer

The meta tag with an attribute property that has a value og:url defines an absolute URL of your web page. This makes the absolute URL to be added to the Open Graph object. The absolute URL is stored in a value of an attribute content.

By adding a meta tag with this property, you communicate the absolute URL of your web page to the social networks will be able to use it and display it to their users.

A web page that has  Open Graph Protocol meta tags enables the page to become an open graph object. This object can then be exported to social networks or other 3rd party systems that understand Open Graph Protocol.

<head>
  <meta property="og:url" content="https://www.bettercoder.io/tests/" />
</head>


 

Comments

No Comments Yet.
Be the first to tell us what you think.
Open Graph Protocol
Open Graph Protocol

Are you learning Open Graph Protocol ? Try our test we designed to help you progress faster.

Test yourself