SEO (Search Engine Optimization) helps search engines understand and present your pages. In HTML, several tags inside the <head> section influence how your page appears in search results and when shared on social media. This guide focuses on the essential tags you’ll set on nearly every page and avoids outdated practices.
You’ll learn how to use the title, meta description, canonical URL, robots meta tag, social preview tags (Open Graph & Twitter), and structured data (JSON-LD) in a clean, modern way.
Most SEO tags live inside the <head> of your document. You typically:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Learn SEO Tags – Beginner Tutorial</title> <!-- ~50–60 chars, unique per page -->
<meta name="description"
content="Beginner-friendly guide to essential SEO tags: title,
meta description, canonical, robots, social cards, and JSON-LD." />
<link rel="canonical" href="https://www.example.com/seo-tags-tutorial" /> <!-- Absolute URL -->
<meta name="robots" content="index, follow" /> <!-- Or noindex,follow on thin/private pages -->
<!-- Social share previews (Open Graph / Twitter) -->
<meta property="og:type" content="article" />
<meta property="og:title" content="Learn SEO Tags – Beginner Tutorial" />
<meta property="og:description" content="Beginner-friendly guide to essential SEO tags." />
<meta property="og:url" content="https://www.example.com/seo-tags-tutorial" />
<meta property="og:image" content="https://www.example.com/assets/seo-cover.jpg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Learn SEO Tags – Beginner Tutorial" />
<meta name="twitter:description" content="Beginner-friendly guide to essential SEO tags." />
<meta name="twitter:image" content="https://www.example.com/assets/seo-cover.jpg" />
</head>
<body>...</body>
</html>
<meta name="robots" content="index, follow" /> <!-- default: index page and crawl links -->
<meta name="robots" content="noindex, follow" /> <!-- hide page, still crawl links -->
<meta name="robots" content="noindex, nofollow" /> <!-- hide page and links -->
<meta name="robots" content="max-snippet:-1, max-image-preview:large" /> <!-- control snippet length and image preview size -->
noindex with a canonical to a different URL—send a clear, consistent signal.Use JSON-LD to describe your content for search engines. This doesn’t directly boost rankings, but it can unlock rich snippets such as article cards, breadcrumbs, product info, and more. The snippet below shows an Article schema.
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "Learn SEO Tags – Beginner Tutorial",
"description": "Beginner-friendly guide to essential SEO tags.",
"author": { "@type": "Person", "name": "Alex" },
"datePublished": "2025-01-10",
"image": ["https://www.example.com/assets/seo-cover.jpg"],
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://www.example.com/seo-tags-tutorial"
}
}
</script>
Title: Learn SEO Tags – Beginner Tutorial
Meta Description: Beginner-friendly guide to essential SEO tags: title, meta description, canonical, robots, social cards, and JSON-LD.
Canonical URL: https://www.example.com/seo-tags-tutorial
Robots: index, follow
OG/Twitter image: https://www.example.com/assets/seo-cover.jpg
Note: We intentionally omit meta keywords because it is obsolete for modern search engines.
lang on the <html> element; use hreflang for multi-language sites.robots.txt or accidental noindex.meta keywords or stuff keywords in titles/descriptions.noindex on non-production sites.<head> section of your HTML.noindex.