HTMLMeta Tags (<meta>)

Meta Tags

The <meta> element provides metadata about a document — information that describes the page but is not displayed to visitors directly. Meta tags live inside <head> and are void elements (no closing tag).

Two shapes of meta tag

Almost every meta tag uses one of two attribute pairs:

  • name / content — describes document-level metadata, like author, description, or viewport settings.

  • http-equiv / content — simulates an HTTP response header from within the HTML, such as a refresh directive or content type.

HTML
<!-- name / content -->
<meta name="description" content="Learn HTML from the ground up." />
<meta name="author" content="Let Codes" />

<!-- http-equiv / content -->
<meta http-equiv="refresh" content="30" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
The description meta tag

<meta name="description"> supplies the short summary search engines often display beneath the title in results (the "snippet"). It does not directly affect ranking, but a well-written one increases click-through rate.

HTML
<meta
  name="description"
  content="A beginner-friendly guide to HTML meta tags: what they do, which ones matter for SEO, and which are obsolete."
/>

Guideline

Recommendation

Length

Roughly 150–160 characters before truncation

Uniqueness

One tailored description per page

Content

A genuine summary, not a list of keywords — write for humans

The robots meta tag

<meta name="robots"> tells crawlers how to treat the page. Common values can be combined with commas.

HTML
<!-- Default behavior, rarely needed explicitly -->
<meta name="robots" content="index, follow" />

<!-- Keep this page out of search results, but still crawl its links -->
<meta name="robots" content="noindex, follow" />

<!-- Don't index and don't follow links from this page -->
<meta name="robots" content="noindex, nofollow" />

Preview

Meaning

index

Allowed to appear in search results (default)

noindex

Never show this page in search results

follow

Crawl the links found on this page (default)

nofollow

Don't pass link authority through this page's links

The (obsolete) keywords meta tag

HTML
<meta name="keywords" content="html, tutorial, web development" />

This tag once let authors list target keywords directly. It was abused so heavily with irrelevant, stuffed keyword lists that major search engines — including Google — stopped using it as a ranking signal entirely, more than a decade ago. It is safe to omit; including it has no SEO benefit today.

Warning
Do not rely on the keywords meta tag for SEO. Modern search engines derive relevant keywords from your actual content, headings, and title instead.
Note
Other common meta tags you will encounter: charset for text encoding, viewport for responsive layout, and the Open Graph / Twitter Card family (og:*, twitter:*) for social link previews — each covered in their own dedicated pages.