meta tag og code example

Example 1: meta tags

<head>
  <meta charset="UTF-8">
  <meta name="description" content="Free Web tutorials">
  <meta name="keywords" content="HTML, CSS, JavaScript">
  <meta name="author" content="John Doe">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>

Example 2: meta property="og:description"

<meta property="og:image" content="https://example.com/rock.jpg" />
<meta property="og:image:width" content="300" />
<meta property="og:image:height" content="300" />
<meta property="og:image" content="https://example.com/rock2.jpg" />
<meta property="og:image" content="https://example.com/rock3.jpg" />
<meta property="og:image:height" content="1000" />

Example 3: all meta og tags

<meta property="og:url" content="https://ahrefs.com/blog/open-graph-meta-tags/" />

Example 4: all meta og tags

<meta property="og:description" content="Learn about 13 features that set Ahrefs apart from the competition." />

Example 5: all meta og tags

<meta property="og:locale" content="en_GB" />

Example 6: all meta og tags

<meta property="og:image" content="https://ahrefs.com/blog/wp-content/uploads/2020/01/fb-open-graph-1.jpg" />

Tags:

Html Example