Skip to content

HTML Tutorial Metadata and the Head

HTML Meta Tags: charset, description and robots

Lesson 69 of 81 2 min read By Deepak Paswan Updated Oct 4, 2026

The meta element provides information about the page. It is an empty element, so it has no closing tag.

charset

index.html
HTML
<meta charset="UTF-8">

Sets the character encoding so that all letters and symbols display correctly. Put it first in the head, within the first 1024 bytes.

viewport

index.html
HTML
<meta name="viewport" content="width=device-width, initial-scale=1">

Makes the page work on phones, see The Viewport.

description

index.html
HTML
<meta name="description" content="Used and new books on Maple Street. Open daily, 9 to 6.">

A short summary. Search engines may show it under your title in results. Write a clear sentence of about 120 to 155 characters for each page.

robots

index.html
HTML
<meta name="robots" content="noindex">

Tells search engines not to list the page. Use it for pages such as “thank you” pages or private areas. Leave it out for pages you want to be found.

theme-color

index.html
HTML
<meta name="theme-color" content="#ca4b00">

Colours the browser bar on some phones.

warning
Leaving noindex on after launch
A forgotten noindex from a test version can keep a whole site out of search results. Check this before you publish.
info
The keywords tag is ignored
<meta name="keywords"> was once used for search. Search engines ignore it today, so you do not need it.