Skip to content

META Tags

META tags are HTML elements placed in the <head></head> of a web page.
They are not displayed directly on the screen, but provide essential information:

  • to browsers (encoding, mobile display, cache…),
  • to search engines (SEO, indexing),
  • to social networks (Open Graph previews, Twitter Cards),
  • to devices and applications (PWA, mobile, iOS/Android).

In short, they describe the page and control its behavior for both users and bots.


TagDescriptionExample
charsetDefines the document encoding<meta charset="UTF-8">
viewportControls zoom and mobile scaling<meta name="viewport" content="width=device-width, initial-scale=1.0">
descriptionPage summary for SEO<meta name="description" content="Complete HTML course for beginners.">
keywordsKeywords (SEO – rarely used today)<meta name="keywords" content="html, web, tutorial">
authorDocument author<meta name="author" content="Baptiste Save">
robotsTells search engines whether to index<meta name="robots" content="index, follow">
generatorSoftware used to create the page<meta name="generator" content="Notepad++">

http-equiv tags (equivalent to HTTP headers)

Section titled “http-equiv tags (equivalent to HTTP headers)”
TagDescriptionExample
refreshReloads or redirects the page<meta http-equiv="refresh" content="5; url=https://example.com">
content-typeSpecifies the MIME type (often redundant with charset)<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
default-styleDefines a default stylesheet<meta http-equiv="default-style" content="main">
x-ua-compatibleForces an Internet Explorer version (deprecated)<meta http-equiv="X-UA-Compatible" content="IE=edge">
cache-controlControls browser cache<meta http-equiv="cache-control" content="no-cache">
pragmaAnother way to disable caching<meta http-equiv="pragma" content="no-cache">

Open Graph (social networks – Facebook, LinkedIn…)

Section titled “Open Graph (social networks – Facebook, LinkedIn…)”
TagDescriptionExample
og:titleTitle displayed in previews<meta property="og:title" content="Complete HTML Course">
og:descriptionDescription for shares<meta property="og:description" content="Learn the basics of HTML">
og:typeContent type (website, article, etc.)<meta property="og:type" content="website">
og:urlCanonical page URL<meta property="og:url" content="https://my-site.com/html">
og:imagePreview image<meta property="og:image" content="https://my-site.com/img/html.jpg">

TagDescriptionExample
twitter:cardCard type (summary, summary_large_image)<meta name="twitter:card" content="summary_large_image">
twitter:titleTitle for the Twitter preview<meta name="twitter:title" content="HTML in 5 minutes">
twitter:descriptionDescription<meta name="twitter:description" content="A simple and quick course.">
twitter:imageImage for Twitter<meta name="twitter:image" content="https://my-site.com/cover.jpg">
twitter:siteTwitter account name<meta name="twitter:site" content="@batsave">

TagDescriptionExample
theme-colorAccent color (on mobile, browsers)<meta name="theme-color" content="#6B2DD7">
copyrightLegal information<meta name="copyright" content="© 2025 Baptiste Save">
application-nameApplication name (PWA)<meta name="application-name" content="Trakrr">
apple-mobile-web-app-capableEnables full-screen mode on iOS<meta name="apple-mobile-web-app-capable" content="yes">
apple-mobile-web-app-status-bar-styleiOS status bar style<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="A simple and complete HTML guide for beginners."
/>
<meta name="robots" content="index, follow" />
<meta name="author" content="Baptiste Save" />