How to Write Meta Tags

Writing effective meta tags involves crafting compelling title tags and descriptions that accurately represent your content, include relevant keywords, and encourage users to click through from search results.

Quick Answer

Write meta tags by creating a keyword-rich title under 60 characters, a compelling description under 155 characters, and adding Open Graph tags for social sharing. Make each page's tags unique.

Explanation

Start with your title tag. Include your primary keyword near the beginning, keep it under 60 characters, and make it compelling enough to stand out in search results. Each page needs a unique title.

Next, write your meta description. Summarize the page content in 120-155 characters, include your keyword naturally, and add a call-to-action. Think of it as ad copy for your page.

For social sharing, add Open Graph (og:) tags for Facebook and Twitter Card tags for Twitter. These control how your content appears when shared on social platforms.

Technical implementation varies by platform. Most CMS systems have built-in fields or plugins for meta tags. For custom sites, add tags in the <head> section of your HTML.

Examples

TypeExample
Title tag format<title>Primary Keyword – Secondary Info | Brand</title>
Meta description format<meta name="description" content="Your 155-char description here...">
Open Graph title<meta property="og:title" content="Your Share Title">
Open Graph description<meta property="og:description" content="Social share description">
Twitter card<meta name="twitter:card" content="summary_large_image">
Canonical tag<link rel="canonical" href="https://example.com/page">

Best Practices

Write unique meta tags for every page on your site.

Include your primary keyword in both title and description.

Test how your tags display using Google's Rich Results Test.

Use the Meta Tag Generator tool for properly formatted code.

Frequently Asked Questions

What meta tags are essential for SEO?

The most important are title tag and meta description. Also include canonical tags to prevent duplicate content issues, and Open Graph tags for social sharing. Robots meta tags control indexing.

Where do meta tags go in HTML?

All meta tags belong in the <head> section of your HTML, before the closing </head> tag. The title tag is a direct child of <head>, while others use the <meta> element.

How many meta tags should a page have?

At minimum: title, description, and canonical. Add Open Graph tags if you share on social media. You might also include viewport (for mobile), robots (for crawling directives), and charset (for encoding).