--- title: ': Element metadanych na poziomie dokumentów' slug: Web/HTML/Element/meta translation_of: Web/HTML/Element/meta ---
{{HTMLRef}}

Element HTML <meta> reprezentuje {{Glossary("Metadata","metadane")}}, które nie mogą być reprezentowane przez inne elementy związane z metadanymi w HTML, takie jak {{HTMLElement("base")}}, {{HTMLElement("link")}}, {{HTMLElement("script")}}, {{HTMLElement("style")}} lub {{HTMLElement("title")}}.

Kategorie treści Metadata content. If the {{htmlattrxref("itemprop")}} attribute is present: flow content, phrasing content.
Dozwolona zawartość None, it is an {{Glossary("empty element")}}.
Pominięcie znacznika As it is a void element, the start tag must be present and the end tag must not be present.
Dozwoleni rodzice <meta charset>, <meta http-equiv>: a {{HTMLElement("head")}} element. If the {{htmlattrxref("http-equiv", "meta")}} is not an encoding declaration, it can also be inside a {{HTMLElement("noscript")}} element, itself inside a {{HTMLElement("head")}} element.
Domniemane role ARIA No corresponding role
Dozwolone role ARIA No role permitted
Interfejs DOM {{domxref("HTMLMetaElement")}}

The type of metadata provided by the meta element can be one of the following:

Attributes

This element includes the global attributes.

Note: the attribute {{htmlattrxref("name", "meta")}} has a specific meaning for the <meta> element, and the {{htmlattrxref("itemprop")}} attribute must not be set on the same <meta> element that has any existing {{htmlattrxref("name", "meta")}}, {{htmlattrxref("http-equiv", "meta")}} or {{htmlattrxref("charset", "meta")}} attributes.

{{htmlattrdef("charset")}}
This attribute declares the document's character encoding. If the attribute is present, its value must be an ASCII case-insensitive match for the string "utf-8".
{{htmlattrdef("content")}}
This attribute contains the value for the {{htmlattrxref("http-equiv", "meta")}} or {{htmlattrxref("name", "meta")}} attribute, depending on which is used.
{{htmlattrdef("http-equiv")}}

Defines a pragma directive. The attribute is named http-equiv(alent) because all the allowed values are names of particular HTTP headers:

{{htmlattrdef("name")}}

The name and content attributes can be used together to provide document metadata in terms of name-value pairs, with the name attribute giving the metadata name, and the content attribute giving the value.

See standard metadata names for details about the set of standard metadata names defined in the HTML specification.

Examples

<meta charset="utf-8">

<!-- Redirect page after 3 seconds -->
<meta http-equiv="refresh" content="3;url=https://www.mozilla.org">

Specifications

Specification Status Comment
{{SpecName('HTML WHATWG', 'semantics.html#the-meta-element', '<meta>')}} {{Spec2('HTML WHATWG')}}

Browser compatibility

{{Compat("html.elements.meta")}}