HTML Meta Tags for SEO: Title, Description, and Open Graph
The HTML meta tags that matter for SEO: title, description, viewport, canonical and Open Graph, so your site looks right on Google and social media.
- Reading time
- 1 min read
- Comments
- Discussion

On this page
Meta tags provide information about your page to browsers and search engines. They don’t appear directly on the page, but they have a big impact on SEO and how your links look when shared.
Essential Meta Tags
Page Title
<title>Learn HTML for Beginners</title>Meta Description
<meta
name="description"
content="A beginner-friendly guide to learning HTML step by step."
/>Viewport (important for mobile)
<meta name="viewport" content="width=device-width, initial-scale=1.0" />Character Set
<meta charset="UTF-8" />Open Graph (for social media sharing)
<meta property="og:title" content="Learn HTML for Beginners" />
<meta
property="og:description"
content="A beginner-friendly guide to learning HTML step by step."
/>
<meta property="og:image" content="https://example.com/image.jpg" />
<meta property="og:url" content="https://example.com/html-guide" />Full Example in <head>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Learn HTML for Beginners</title>
<meta
name="description"
content="A beginner-friendly guide to learning HTML step by step."
/>
<!-- Open Graph -->
<meta property="og:title" content="Learn HTML for Beginners" />
<meta
property="og:description"
content="A beginner-friendly guide to learning HTML step by step."
/>
<meta property="og:image" content="https://example.com/image.jpg" />
</head>Quick Tips
- Keep the title under 60 characters when possible.
- Meta descriptions work best around 150–160 characters.
- Always include the viewport meta tag for responsive design.
- Open Graph tags help your links look better on social media.

Written by
Razak
Writes about the web, slowly, and builds small tools on the side.
Keep reading
Read next
1 minBest Practices for Writing Clean and Valid HTML
A collection of HTML best practices including proper indentation, naming, W3C validation, and common beginner mistakes you should avoid.
Read article
2 minGetting to Know HTML Iframe: How to Embed YouTube and Google Maps
How to use the HTML <iframe> tag to embed content from other sites, like a YouTube video or a Google Map, inside your own page.
Read article
1 minHow to Create Forms in HTML for Beginners
A beginner's guide to HTML forms: how the <form> tag sends data for logins, sign-ups and contact messages, starting from the basics.
Read article
Discussion
Comments
Loading comments…