SEO Meta Tags and Structured Data
Learn practical HTML SEO with titles, meta descriptions, canonical URLs, Open Graph, Twitter cards, and JSON-LD structured data.
Learn practical HTML SEO with titles, meta descriptions, canonical URLs, Open Graph, Twitter cards, and JSON-LD structured data. This hands-on tutorial focuses on practical implementation of seo meta tags and structured data concepts.
SEO Meta Tags and Structured Data
HTML plays a major role in discoverability. Search engines do not just read keywords, they read structure, semantics, metadata, and how clearly a page communicates its purpose.
Lesson Path
- Previous lesson: Accessibility and ARIA
- In this lesson: You learn how HTML improves search visibility and sharing previews.
- Next lesson: Modern HTML APIs and Elements
1. The Core SEO Signals in HTML
At the HTML level, the biggest SEO wins usually come from:
- a strong
<title> - a useful meta description
- one clear
<h1> - semantic headings and sections
- descriptive image
alttext - canonical URLs
Essential Head Metadata
<title>Modern HTML Course for Beginners and Professionals | TechCoder.io</title>
<meta name="description" content="Learn modern HTML from beginner to advanced." />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="canonical" href="https://techcoder.io/html/introduction-to-html" />
2. Social Sharing Metadata
Search is not the only discovery channel. When a page is shared on WhatsApp, X, LinkedIn, or Facebook, metadata controls the preview card.
Open Graph Example
<meta property="og:title" content="Modern HTML Course" />
<meta property="og:description" content="Master semantic HTML5." />
<meta property="og:image" content="https://techcoder.io/og/html-course.png" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://techcoder.io/html/introduction-to-html" />
Twitter Card Example
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Modern HTML Course" />
<meta name="twitter:description" content="Master semantic HTML5." />
3. Canonical URLs
Canonical URLs help search engines understand which version of a page is the preferred one.
This matters when:
- the same content appears at multiple URLs
- marketing query strings create alternate versions
- pages are duplicated across categories or archives
<link rel="canonical" href="https://techcoder.io/html/introduction-to-html" />
4. Structured Data with JSON-LD
Structured data helps search engines understand page type and content relationships.
For learning platforms, common schema types include:
CourseArticleBreadcrumbListFAQPageOrganization
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Course",
"name": "Modern HTML Course",
"description": "A practical beginner-to-pro HTML course.",
"provider": {
"@type": "Organization",
"name": "TechCoder.io"
}
}
</script>
5. SEO Best Practices for HTML Authors
- Write a unique title for every page.
- Use one clear
h1and logical heading hierarchy. - Avoid vague link text like "click here."
- Use descriptive file names for images.
- Add Open Graph and Twitter metadata for shareability.
- Validate structured data with Google's Rich Results Test.
SEO-Ready HTML Head
Build the head section for a course lesson page with title, description, canonical URL, Open Graph metadata, and JSON-LD.