💡 Tip: Login now to track your course progress and unlock your downloadable certificates instantly!

HTML Meta Tags for SEO

Meta tags are snippets of text placed inside the <head> section of an HTML document.
They provide metadata about your web page to search engines, browsers, and social media platforms.
While meta tags aren’t visible to users, they play a major role in SEO (Search Engine Optimization), social sharing, and page indexing.

Basic Syntax

<meta name="name" content="value">

Each meta tag has two main parts:

  • name → defines the type of metadata.
  • content → specifies the actual information.

Example: Common SEO Meta Tags

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTML Meta Tags for SEO</title>
  
  <meta name="description" content="Learn how to use HTML meta tags to improve your website SEO, visibility, and click-through rate.">
  <meta name="keywords" content="HTML, meta tags, SEO, description, keywords">
  <meta name="author" content="HTML5 & CSS3">
  
  <meta property="og:title" content="HTML Meta Tags for SEO">
  <meta property="og:description" content="Understand the importance of meta tags for SEO and how they help search engines rank your site.">
  <meta property="og:image" content="seo-thumbnail.jpg">
  <meta property="og:url" content="https://html5andcss3.org/html-meta-tags">
  
  <meta name="robots" content="index, follow">
</head>
<body>
  <h1>HTML Meta Tags for SEO</h1>
</body>
</html>

Meta Description

<meta name="description" content="A short summary about your web page for search results.">
  • Ideal length: 50–160 characters
  • Appears below the page title in Google search results
  • Helps improve click-through rate (CTR)

Example:

<meta name="description" content="Learn HTML and CSS with practical examples and hands-on tutorials.">

Meta Keywords (Deprecated but Optional)

<meta name="keywords" content="HTML, CSS, JavaScript, web development">

⚠️ Note: Most modern search engines (like Google) ignore this tag, but some smaller or custom engines may still use it.

Meta Author

<meta name="author" content="Your Website or Company Name">

Defines who created the page — good for credit or corporate branding.

Meta Viewport (for Mobile SEO)

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

Ensures your page scales correctly on all devices — a must for mobile-friendly SEO.

Meta Robots

<meta name="robots" content="index, follow">

Tells search engines whether to index or ignore your page.

  • index – allow indexing
  • noindex – don’t index
  • follow – follow links
  • nofollow – don’t follow links

Example:

<meta name="robots" content="noindex, nofollow">

Open Graph Tags (for Social Media)

<meta property="og:title" content="Learn Meta Tags for SEO">
<meta property="og:description" content="A beginner-friendly guide to HTML meta tags.">
<meta property="og:image" content="og-image.jpg">
<meta property="og:url" content="https://html5andcss3.org/meta-tags">

Used by Facebook, LinkedIn, and Twitter to show rich previews when sharing links.

Twitter Card Tags

<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="HTML Meta Tags for SEO">
<meta name="twitter:description" content="Master meta tags to improve your SEO performance.">
<meta name="twitter:image" content="twitter-image.jpg">

These ensure your links look great when shared on X (Twitter).

Meta Charset

<meta charset="UTF-8">

Ensures proper character encoding — necessary for international websites.

Meta Refresh Redirect

<meta http-equiv="refresh" content="5; url=https://html5andcss3.org/">

Redirects the page after 5 seconds to another URL (use sparingly).

Canonical Tag

<link rel="canonical" href="https://html5andcss3.org/html-meta-tags">

Prevents duplicate content issues and tells search engines the preferred version of a page.

SEO Best Practices

  • Always include meta description, viewport, and charset.
  • Avoid stuffing keywords — write natural descriptions.
  • Use Open Graph and Twitter tags for better social previews.
  • Ensure every page has a unique title and description.

Conclusion

Meta tags are the invisible backbone of SEO — they tell search engines what your page is about, how it should appear, and how it interacts with other platforms.
Proper use of meta tags boosts your site’s visibility, ranking, and user engagement.

Sign In Form

User your email and password to singn in

Don’t have an account, signup here : 

HTML5 & CSS3

Tools and Tutorials

Want a Website

Want a website for your business ?

Please fill out the details below, so we can reach out to you.

Registration Form

Signup to track your record and much more.

We have sent you an email with a registration link. Please click the link to verify your email address, or enter the 6-digit OTP provided in the email.

Didn't receive the OTP. Regenerate OTP Resend