Skip to main content

What is Open Graph and why is it needed?

Open Graph is a markup standard developed by Facebook that lets you control how a page looks when shared on social networks (Facebook, Twitter, Telegram, etc.).


How it works:

Special tags like these are added to the <head> of the HTML page:

html
<meta property="og:title" content="Page title"> <meta property="og:description" content="Description"> <meta property="og:image" content="https://site.com/image.jpg"> <meta property="og:url" content="https://site.com/page">

Why it is needed:

  1. Control over appearance when shared Without OG, a social network substitutes arbitrary text and an image. With OG, you set it all yourself.
  2. Increased click-through rate An attractive title + image = a higher chance of being clicked.
  3. Brand consistency All links get a unified visual style. This matters for image.
  4. Messenger support Telegram, WhatsApp, iMessage use OG tags for link previews.

If you do not set Open Graph, social networks will generate the snippet their own way. And that is a lottery.

Short Answer

Interview ready
Premium

A concise answer to help you respond confidently on this topic during an interview.