CHAPTER 12
Beginner
HTML Meta Tags and SEO Basics
Updated: May 10, 2026
5 min read
# HTML Meta Tags and SEO Basics
1. Introduction
The<head> of your HTML document contains data *about* data, known as metadata. This information isn't visible on the webpage itself, but it is critically important for Search Engines (Google) and Social Media (Twitter/Facebook) to understand your site.
2. Learning Objectives
- Define page titles and descriptions for SEO.
- Configure the viewport for mobile devices.
- Use Open Graph tags for social media link previews.
3. Detailed Explanations
The <title> Tag
This is the most important SEO tag. It defines the text that appears in the browser tab and acts as the clickable headline in Google Search results.
html
The Description Meta Tag
This defines the small paragraph of text that appears under the title in Google Search results.
html
The Viewport Meta Tag (CRITICAL)
Without this tag, mobile browsers will assume your site is meant for a desktop and will zoom way out, making text unreadable. Always include this.
html
Character Set
Tells the browser what character encoding to use (always use UTF-8 to support all languages and emojis).
html
Open Graph (Social Media) Tags
When you paste a link into WhatsApp, Twitter, or Discord, it automatically generates a preview card with an image. This is done using Open Graph (og:) tags!
html
4. Mini Project: The Perfect <head>
Every professional HTML document should start looking something like this:
html
5. MCQs
Q1: Which meta tag is absolutely required to make a website mobile-friendly? A)<meta name="mobile" content="true">
B) <meta name="viewport" content="width=device-width, initial-scale=1.0">
C) <meta name="responsive" content="yes">
D) <meta charset="UTF-8">
*Answer: B*
6. Summary
Meta tags are invisible to the user but highly visible to robots. Properly configuring yourtitle, description, and viewport is step number one in Search Engine Optimization (SEO).