Meta Tags: What They Are and Which Ones Matter for SEO

November 11, 2026 · 12 min read

Meta Tags: What They Are and Which Ones Matter for SEO

Meta tags are <meta> elements in a page's head that pass information to browsers, search engines and link-preview crawlers without showing it to readers. Only a few affect search: description, robots, viewport and charset. This guide shows what each tag does, which ones Google reads or ignores, and how to add them when you write in Markdown.

What Are Meta Tags in HTML?

HTML meta tags are void elements: they have no closing tag and no content between tags. Everything a tag says lives in its attributes, and it sits inside the document's head. Browsers read some of them to decode and lay out the page. Search engines read others to decide what to index, and social platforms read a third group to build link previews.

Most meta tags you'll write take one of four shapes:

  • charset declares the character encoding, as in <meta charset="utf-8">.
  • name plus content stores a named value, as in <meta name="description" content="A short summary">.
  • http-equiv plus content behaves like an HTTP response header, as in <meta http-equiv="refresh" content="5">.
  • property plus content is the Open Graph form, as in <meta property="og:title" content="Page title">.

Plenty of articles lump other head elements in with these. The <title> element, <link rel="canonical"> and hreflang links all live in the head, but they aren't <meta> elements. A later section explains what each one does.

Meta Tags Example: An Annotated Head for an Article Page

Here's a head block for a typical article page. Swap in your own text and URLs:

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Cast Iron Care: Seasoning and Cleaning | Example Kitchen</title>
  <meta name="description" content="How to season, clean and store a cast iron pan, with a 10-minute routine you can repeat after every use.">
  <meta property="og:title" content="Cast Iron Care: Seasoning and Cleaning">
  <meta property="og:description" content="A 10-minute routine for seasoning and cleaning cast iron.">
  <meta property="og:type" content="article">
  <meta property="og:url" content="https://example.com/cast-iron-care">
  <meta property="og:image" content="https://example.com/images/cast-iron.jpg">
  <meta name="twitter:card" content="summary_large_image">
</head>

Line by line, this is what each part does:

  1. charset comes first because an encoding declaration must sit within the first 1024 bytes of the document, per MDN's meta element reference. UTF-8 is the only valid value.
  2. viewport with width=device-width, initial-scale=1 makes a phone lay the page out at its own screen width instead of a zoomed-out desktop width.
  3. title isn't a meta tag, but every page needs one in the head, so it's shown in place.
  4. description is the summary Google may show under your result.
  5. og: tags use the property attribute and drive link previews on social platforms.
  6. twitter:card uses name, not property, and picks the card layout on X.

There's no robots tag in this block on purpose. Pages are indexable by default, so you only add one when you want to restrict something.

Which Meta Tags Matter for SEO? What Google Reads and Ignores

Google publishes its own list on the meta tags and attributes that Google supports page, and it's the best referee for deciding which SEO meta tags are worth your time. Google says it ignores any meta tag it doesn't support. Here's what the page covers as of November 2026:

Meta tagWhat it doesGoogle's position
descriptionShort summary of the pageSupported; may become the search snippet
robots and googlebotCrawling and indexing rulesSupported; googlebot applies to Google only
google-site-verificationProves ownership in Search ConsoleSupported; the one value where letter case matters
charset or Content-TypeCharacter encodingSupported; Google recommends UTF-8
viewportHow the page renders on mobileSupported; tells Google the page is mobile friendly
refreshSends the visitor to another URL after a delaySupported, but Google recommends a server-side 301 redirect
ratingMarks adult contentSupported; used for SafeSearch filtering
googlebot with notranslateOpts out of Google's translation offerSupported
google with nopagereadaloudBlocks Google text-to-speech readersSupported
keywordsA list of target termsNot used; no effect on indexing or ranking
Any other nameCustom or legacy valuesIgnored by Google Search

Supported doesn't mean it's a ranking boost. In a September 2009 post on Google's Search Central blog, Google said it uses neither the keywords tag nor the description tag in ranking. So meta tags for SEO mostly control three things: what your search result looks like, whether the page gets indexed, and how it renders on phones.

The Meta Description Tag in Brief

The description tag, <meta name="description" content="...">, summarizes the page in a sentence or two. Google builds most snippets from the page's own text and uses your description when it judges it a more accurate summary. Google sets no fixed length and trims snippets to fit the device, and our meta description guide covers length and wording in detail.

To draft one, our free meta tag builder writes the description and Open Graph tags in your browser and shows a search result preview. That preview estimates pixel widths from approximate font metrics, so treat it as a guide, not Google's exact cut.

Technical Meta Tags: Charset, Viewport, Robots and http-equiv

These tags don't change what a reader sees in your text, but they change how browsers and crawlers handle the page.

Charset. Use <meta charset="utf-8"> once and keep it first in the head. The HTML spec allows only one charset tag per page. Without a declared encoding, a browser can misread accented letters and symbols.

Viewport. Stick with width=device-width, initial-scale=1. Don't add user-scalable=no, because MDN's viewport page warns that disabling zoom stops people with low vision from reading the page. WCAG requires at least 2x scaling, so a maximum-scale below 2 causes the same problem in browsers that honor it.

Robots. noindex keeps a page out of results and nofollow tells crawlers not to follow its links. A robots tag applies to every crawler, a googlebot tag to Google only, and Google applies the stricter rule when they conflict. A noindex tag only works if the page isn't blocked in robots.txt, since a blocked crawler never sees it. For PDFs and other non-HTML files, send the same rules in an X-Robots-Tag HTTP header. Our robots meta tag guide goes deeper.

http-equiv. The two you'll meet are refresh, which reloads or redirects after a delay, and content-security-policy, which limits where scripts and other resources can load from. MDN warns that a short refresh interval can redirect screen reader users before they finish reading. X-UA-Compatible is a legacy Internet Explorer setting that today's browsers ignore.

Browser-only names. theme-color suggests a color for the browser's interface, color-scheme lists the light or dark schemes the page supports, and referrer controls the Referer header on outgoing requests. Google Search ignores all three, so add them for visitors, not rankings.

Social Meta Tags: Open Graph and twitter:card in a Few Lines

Social platforms read their own tags to build link previews. Open Graph tags use property, and the Open Graph protocol at ogp.me names four required properties: og:title, og:type, og:image and og:url. None of these social tags is on Google's supported list, so they shape shared links rather than search results.

X reads twitter:card with the name attribute. X's card documentation describes a fallback to matching og: values when a tag such as twitter:title is missing, but twitter:card itself has no og: equivalent. Our Open Graph protocol guide covers the full property list and the preview debuggers.

Meta Keywords and Other Tags You Can Delete

The keywords tag is the classic leftover. Google said in September 2009 that it doesn't use it for ranking, and its current documentation says the tag has no effect on indexing and ranking at all. We prefer to delete a keywords tag rather than maintain it, since it also hands competitors a tidy list of the terms you're targeting.

A few other tags still show up in old templates and SEO checklists:

  • HandheldFriendly and MobileOptimized, written for early mobile browsers before the viewport tag.
  • revisit-after, which asks crawlers to come back after a set number of days.
  • X-UA-Compatible, the Internet Explorer pragma mentioned above.

None of them appears on Google's supported list, so Google Search ignores them. They don't break anything, but they add noise to every page.

What Is Metadata in SEO? Title, Canonical and Structured Data Beyond Meta Tags

In SEO, metadata means all the machine-readable information about a page, and the <meta> element is only one part of it. These are the other head elements that matter:

  • <title> sets the browser tab text and is one of several sources Google uses for the title link in results. Google may rewrite it, and our title tag guide covers writing one.
  • <link rel="canonical" href="..."> names the preferred URL among duplicates. Google calls it a strong signal, which still leaves Google free to pick a different URL.
  • <link rel="alternate" hreflang="de" href="..."> points to a version of the page in another language or region.
  • <html lang="en"> declares the page language. Google detects language from the visible text and doesn't rely on this attribute, but browsers and screen readers do.
  • <script type="application/ld+json"> holds structured data such as FAQPage or Article markup. The meta tag builder above can produce FAQPage JSON-LD from Markdown questions.

The difference matters when you debug. A missing canonical isn't a meta tag problem, and adding another meta tag won't fix it.

How Meta Tags Get Into Pages You Write in Markdown

Markdown has no meta tag syntax. A raw <meta> line typed into a Markdown file lands in the page body, but Google's docs say these tags belong in the head. Instead, something outside the Markdown writes the head for you. There are three common routes:

RouteWhat writes the tagsWhat you provide
Static site generatorA layout template or SEO pluginFront matter fields such as title, description and image
CMS such as WordPressAn SEO plugin or theme settingValues typed into the post's settings panel
Standalone HTML conversionThe converter's document templateA metadata block, or edits to the finished file

With a static site generator, you put fields at the top of each file, and our Markdown front matter guide explains the YAML rules. In Jekyll, the jekyll-seo-tag plugin uses those fields and your site settings to output description, canonical, Open Graph and X card tags plus JSON-LD. Hugo ships embedded partials for Open Graph and X cards, while the description tag itself depends on your theme. Docusaurus maps a docs page's description field to the description tag and og:description, and its image field to og:image.

WordPress core gives you no description field out of the box, so most sites rely on an SEO plugin. Our WordPress Markdown guide covers getting Markdown posts into WordPress.

For the third route, Pandoc's --standalone flag (-s for short) wraps the output in a full HTML document. Take this file, saved as care.md:

---
title: Cast Iron Care
description: How to season, clean and store a cast iron pan.
---

Running pandoc -s care.md -o care.html with Pandoc 3.8 produces a head that starts like this:

<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<meta name="description" content="How to season, clean and store a cast iron pan." />
<title>Cast Iron Care</title>

Our Markdown to HTML converter also returns a full HTML document from your Markdown, and you can add the tags you need to its head before uploading. One limitation to know: our editor's preview doesn't render front matter and doesn't show head tags, so check the built page's source to confirm the final output. Our guide on how to check meta tags walks through view source, DevTools and curl.

A page needs only a handful of meta tags to do its job. Charset and viewport serve browsers, a unique description shapes search snippets, robots restricts indexing when you need it, and Open Graph builds link previews. Skip the keywords tag and the legacy mobile tags. If you're drafting the head for a new page, try the meta tag builder, then write the article itself in our Markdown editor.