HTML

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.

RazakTerra
Reading time
1 min read
Comments
Discussion
HTML Meta Tags for SEO: Title, Description, and Open Graph
On this page
  1. Essential Meta Tags
  2. Open Graph (for social media sharing)
  3. Full Example in <head>
  4. Quick Tips

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

HTML
<title>Learn HTML for Beginners</title>

Meta Description

HTML
<meta
  name="description"
  content="A beginner-friendly guide to learning HTML step by step."
/>

Viewport (important for mobile)

HTML
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

Character Set

HTML
<meta charset="UTF-8" />

Open Graph (for social media sharing)

HTML
<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>

HTML
<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.

Discussion

Comments

Loading comments…

Keep reading