HTML <meta> Tag

If this site has been useful, we’d love your support! Running this site takes time and resources, and every small contribution helps us keep creating valuable content. Consider buying us a coffee to keep things going strong!

Description

The <meta> HTML element defines the data (they are also called meta tags) that are used to store information intended for browsers and search engines. For example, search engine mechanisms use meta tags to get site descriptions, keywords, and other data. It is allowed to use more than one meta tag, all of them are placed in the <head> container. As a rule, the attributes of any meta tag are reduced to "name = value" pairs whose names are determined by the keywords content , name or http-equiv.

Properties

Permitted Parents
A <head> element. If the http-equiv is not an encoding declaration, it can also be inside a <noscript> element, itself inside a <head> element
Content
None. It is an empty element.
Start/End Tags
Start tag: required, End tag: forbidden

Example

<head>
<meta charset="UTF-8">
<meta name="description" content="Description of website">
<meta name="keywords" content="Keywords Used">
<meta name="author" content="Authors Name">
</head>

Attributes

Attribute Definition
charset Specifies the character encoding for the HTML document
content Specifies the property's value.
http-equiv Used for http response message headers. For example http-equiv can be used to refresh the page or to set a cookie. Values include content-type, expires, refresh and set-cookie.
name Name for the property. Can be anything. Examples include, keywords, description, author, revised, generator etc.

Global Attributes

The <meta> tag also supports the Global Attributes in HTML5

Event Attributes

The <meta> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <meta> tag.

Desktop
Edge Chrome Firefox Opera Safari
121112.11
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18412.1114.4

Last updated by CSSPortal on: 30th March 2024