HTML reference
meta
The <meta> element stores metadata about an HTML document in its <head>. It helps browsers, search services, and other tools interpret the page.
What you will learn
- What metadata the
metaelement represents - What
charset,viewport, anddescriptiondo - How metadata differs from visible content
Common examples
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="A short summary of this page.">What each one does
charset- Declares the character encoding so text can be decoded correctly. UTF-8 is the usual choice for modern pages.
viewport- Gives mobile browsers guidance for sizing and scaling the layout.
description- Provides a summary that search services may use. It is not a guarantee of the displayed search snippet.
Metadata is not page content
Put information readers should see in the body. Metadata describes the document; it should not be used as a hidden substitute for useful content or keyword stuffing.