View video tutorial

HTML <meta> Tag


The <meta> tag describes the metadata about the page.

Metadata - Data about data

Meta data is the data about another data.

<meta> tag is usually used to specify character set, keywords, author of the document, page descriptions, and viewport settings.

<meta> tag can be used multiple times, and must be inside <head> tag.

The information in <meta> tag are used by browsers, search engine, or other web services.

Metadata is not displayed on the page.

Element Attributes

Attribute Value Description
charset character_set This specifies character encoding in which the document is encoded.
content text This attribute contains the value of the http-equiv or name attribute, depending on which one is used.
http-equiv content-security-policy&tab;
Provides an HTTP header for the data / value of the content attribute.
name application-name
This attribute specifies the metadata name.

Global attributes

Global attributes may be applied on all elements, although some elements may have no effect on them.

<accesskey>, <class>, <contenteditable>, <contextmenu>, <data-*>, <dir>, <draggable>, <dropzone>, <hidden>, <id>, <lang>, <spellcheck>, <style>, <tabindex>, <title>, <translate>.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


<!DOCTYPE html>
<!-- Example: Meta Tag -->
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="author" content="w3context Team">
    <meta name="description" content="Online tutorials">
    <h1>Example meta tag.</h1>
    <h2>The meta information are used by browsers, search engine, or other web services.</h2>
    <p>Metadata is not displayed on the page.</p>
Try it Now »

Click on the "Try it Now" button to see how it works.