DEV Community

Matthew Cullen
Matthew Cullen

Posted on

Using Open Graph Meta Tags

og:tags

I use these to customize the content of previews when linking my websites on social media posts. See the image below for an example.

Alt Text
To change the content of these fields just add these meta tags in your Header. There are more but for this example I included the most common og tags.

<meta property='og:title' content='Title of the article'/>

<meta property='og:image' content='image url'/>

<meta property='og:description' content='Description that will show in the preview'/>

<meta property='og:url' content='URL of the content'/>
Enter fullscreen mode Exit fullscreen mode

To learn more check out https://ogp.me/

Top comments (0)