HTML Meta Tags
Also Known As
TL;DR
Explanation
Meta tags communicate page intent to machines without displaying content to users. The core set every page needs: <title> (browser tab, search snippet headline, the highest-value SEO element), <meta name='description'> (search snippet body — not a ranking factor but directly affects CTR), <meta name='viewport' content='width=device-width, initial-scale=1'> (required for correct mobile rendering), and <link rel='canonical'> (defines the authoritative URL to prevent duplicate indexing). Social meta (Open Graph and Twitter Cards) control how the page appears when shared. <meta name='robots'> controls indexing. Each page needs unique title and description — duplicates across pages split ranking signals and reduce CTR. The meta keywords tag is deprecated and ignored by Google since 2009.
Common Misconception
Why It Matters
Common Mistakes
- Missing viewport meta — pages render at desktop width on mobile with no zoom control.
- Same meta description on every page — search engines show the same snippet for all pages, reducing CTR.
- Title over 60 characters — Google truncates in search results, hiding the most important part.
- user-scalable=no in viewport — prevents zooming, failing WCAG accessibility criteria.
- Omitting Open Graph tags — social previews show default or no image when pages are shared.
Avoid When
- Do not use meta keywords — they are ignored by major search engines and add noise.
- Do not add user-scalable=no to viewport — it prevents zooming and fails WCAG 1.4.4.
When To Use
- Every page needs viewport, title, and description meta as a baseline.
- Add Open Graph and Twitter Card meta on any page that might be shared on social media.
- Add robots meta only when you need to explicitly control indexing — default is index, follow.
Code Examples
<!-- Bare minimum that will cause problems -->
<head>
<title>Home</title>
</head>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Product Name — Best Shop Online | Brand</title>
<meta name="description" content="Find the best products at competitive prices. Free delivery on orders over £30.">
<link rel="canonical" href="https://example.com/products/">
<meta property="og:title" content="Product Name — Brand">
<meta property="og:description" content="Best products, fast delivery.">
<meta property="og:image" content="https://example.com/og-image.jpg">
<meta property="og:url" content="https://example.com/products/">
</head>