- 1Accessibility in HTML
- 2Alt Text for Images
- 3ARIA Roles in HTML
- 4Semantic HTML for Accessibility
- 5Keyboard Navigation in HTML
- 6Screen Reader Accessibility in HTML
- 7HTML Best Practices for SEO
- 8HTML Meta Tags
- 9HTML Headings Best Practices
- 10Title and Meta Description Tags in HTML
- 11HTML Linking Structure
- 12HTML Clean Code Standards
Meta Tags
charset, description, viewport, SEO Examples
Meta Tags: The Silent Signals Behind Every Smart Web Page
Meta tags don’t show up on your webpage, but they speak volumes to search engines, browsers, and social platforms. They're your site’s introduction, translator, and rulebook — all hidden in the <head>
.
1. What Are Meta Tags?
Meta tags provide metadata — information about your page — to search engines and browsers. They help define character encoding, page descriptions, viewport behavior, and more.
2. The meta charset
Tag
This tag defines the character encoding — the set of characters your page supports. Without it, browsers may misinterpret text like “café” or “naïve”.
<meta charset="UTF-8">
[ Tells the browser: This page uses UTF-8, which supports nearly all characters. ]
Best Practice: Always place this at the very top of your <head>
for fast interpretation.
3. The meta name="description"
Tag
This tag tells search engines what your page is about. It often shows up in search result snippets.
<meta name="description" content="Learn fun facts about apples, bananas, and cherries — and which fruit wins the crown.">
[ Appears as the description beneath the link in Google Search. ]
Tips:
- Keep it under 160 characters
- Write like a teaser — informative but intriguing
- Include important keywords naturally
4. The meta name="viewport"
Tag
This tag controls how your webpage scales on different screen sizes — especially crucial for mobile devices.
<meta name="viewport" content="width=device-width, initial-scale=1">
[ Ensures your layout adapts to the width of the user’s device. ]
Without this tag, mobile visitors might see your page zoomed out and unreadable.
5. Other Common Meta Tags
| Tag | Purpose | |-----|---------| |<meta name="author">
| Sets the content author |
| <meta name="robots">
| Tells search bots how to crawl/index |
| <meta property="og:title">
| Open Graph title for social media sharing |
| <meta http-equiv="refresh">
| Automatically refreshes or redirects a page |
<meta name="author" content="Fruit Team">
<meta name="robots" content="index, follow">
6. A Sample <head>
with Meta Tags
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fruit Catalog: Apple, Banana, Cherry</title>
<meta name="description" content="Explore sweet and healthy fruit facts: apples, bananas, cherries, and more!">
</head>
[ Search engines and browsers use this metadata to index and display your page ]
Summary
Meta tags shape how your webpage is understood — by bots, browsers, and beyond. Today you learned:
- How to define character encoding with
meta charset
- Why
meta name="description"
affects SEO visibility - How
meta viewport
ensures mobile responsiveness - Which other meta tags can support SEO, sharing, and control
What’s Next?
In the next tutorial, we’ll dive into building a complete <head>
section for a real-world HTML page — with SEO, accessibility, and social sharing in mind.