content

The content attribute supplies a value for metadata, commonly on a <meta> element. It describes information about the document rather than displaying a paragraph on the page.

What you will learn

Basic examples

<meta name="description" content="A short summary of this page.">
<meta property="og:title" content="HTML basics">

The name or property attribute identifies what the value means, and content supplies the value. Browsers, search services, and social sharing tools may read this metadata.

Metadata is not visible content

A description in content does not replace the page's heading or article text. Write a useful visible page for people first, then add metadata that summarizes or describes it consistently.

Use the right vocabulary

The exact meaning of a content value comes from the attribute or vocabulary that uses it. Follow the documentation for the relevant metadata format instead of assuming that any arbitrary name will be understood.

Related pages