aboutsummaryrefslogtreecommitdiff
path: root/files/pl/web/html/element/meta/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'files/pl/web/html/element/meta/index.html')
-rw-r--r--files/pl/web/html/element/meta/index.html144
1 files changed, 144 insertions, 0 deletions
diff --git a/files/pl/web/html/element/meta/index.html b/files/pl/web/html/element/meta/index.html
new file mode 100644
index 0000000000..8fbc0241f3
--- /dev/null
+++ b/files/pl/web/html/element/meta/index.html
@@ -0,0 +1,144 @@
+---
+title: '<meta>: Element metadanych na poziomie dokumentów'
+slug: Web/HTML/Element/meta
+translation_of: Web/HTML/Element/meta
+---
+<div>{{HTMLRef}}</div>
+
+<p><strong>Element HTML <code>&lt;meta&gt;</code></strong> 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")}}.</p>
+
+<table class="properties">
+ <tbody>
+ <tr>
+ <th><a href="/pl/docs/Web/Guide/HTML/Content_categories">Kategorie treści</a></th>
+ <td>Metadata content. If the {{htmlattrxref("itemprop")}} attribute is present: <a href="/en-US/docs/Web/HTML/Content_categories#Flow_content">flow content</a>, <a href="/en-US/docs/Web/HTML/Content_categories#Phrasing_content">phrasing content</a>.</td>
+ </tr>
+ <tr>
+ <th>Dozwolona zawartość</th>
+ <td>None, it is an {{Glossary("empty element")}}.</td>
+ </tr>
+ <tr>
+ <th>Pominięcie znacznika</th>
+ <td>As it is a void element, the start tag must be present and the end tag must not be present.</td>
+ </tr>
+ <tr>
+ <th>Dozwoleni rodzice</th>
+ <td><code>&lt;meta charset&gt;</code>, <code>&lt;meta http-equiv&gt;</code>: 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.</td>
+ </tr>
+ <tr>
+ <th scope="row">Domniemane role ARIA</th>
+ <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role">No corresponding role</a></td>
+ </tr>
+ <tr>
+ <th scope="row">Dozwolone role ARIA</th>
+ <td>No <code>role</code> permitted</td>
+ </tr>
+ <tr>
+ <th>Interfejs DOM</th>
+ <td>{{domxref("HTMLMetaElement")}}</td>
+ </tr>
+ </tbody>
+</table>
+
+<p>The type of metadata provided by the <code>meta</code> element can be one of the following:</p>
+
+<ul>
+ <li>If the {{htmlattrxref("name", "meta")}} attribute is set, the <code>meta</code> element provides <em>document-level metadata</em>, applying to the whole page.</li>
+ <li>If the {{htmlattrxref("http-equiv", "meta")}} attribute is set, the <code>meta</code> element is a <em>pragma directive</em>, providing information equivalent to what can be given by a similarly-named HTTP header.</li>
+ <li>If the {{htmlattrxref("charset", "meta")}} attribute is set, the <code>meta</code> element is a <em>charset declaration</em>, giving the character encoding in which the document is encoded.</li>
+ <li>If the {{htmlattrxref("itemprop")}} attribute is set, the <code>meta</code> element provides <em>user-defined metadata</em>.</li>
+</ul>
+
+<h2 id="Attributes">Attributes</h2>
+
+<p>This element includes the <a href="/en-US/docs/Web/HTML/Global_attributes">global attributes</a>.</p>
+
+<div class="note">
+<p><strong>Note:</strong> the attribute {{htmlattrxref("name", "meta")}} has a specific meaning for the <code>&lt;meta&gt;</code> element, and the {{htmlattrxref("itemprop")}} attribute must not be set on the same <code>&lt;meta&gt;</code> element that has any existing {{htmlattrxref("name", "meta")}}, {{htmlattrxref("http-equiv", "meta")}} or {{htmlattrxref("charset", "meta")}} attributes.</p>
+</div>
+
+<dl>
+ <dt>{{htmlattrdef("charset")}}</dt>
+ <dd>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 "<code>utf-8</code>".</dd>
+ <dt>{{htmlattrdef("content")}}</dt>
+ <dd>This attribute contains the value for the {{htmlattrxref("http-equiv", "meta")}} or {{htmlattrxref("name", "meta")}} attribute, depending on which is used.</dd>
+ <dt>{{htmlattrdef("http-equiv")}}</dt>
+ <dd>
+ <p>Defines a pragma directive. The attribute is named <code><strong>http-equiv</strong>(alent)</code> because all the allowed values are names of particular HTTP headers:</p>
+
+ <ul>
+ <li><code>content-security-policy</code>
+
+ <p>Allows page authors to define a <a href="/en-US/docs/Web/Security/CSP/CSP_policy_directives">content policy</a> for the current page. Content policies mostly specify allowed server origins and script endpoints which help guard against cross-site scripting attacks.</p>
+ </li>
+ <li><code>content-type</code>
+ <p>If specified, the <code>content</code> attribute must have the value "<code>text/html; charset=utf-8</code>". <strong>Note: </strong> Can only be used in documents served with a <code>text/html</code> <a href="/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types">MIME type</a> — not in documents served with an XML MIME type.</p>
+ </li>
+ <li><code>default-style</code>
+ <p>Sets the name of the default <a href="/en-US/docs/Web/CSS">CSS style sheet</a> set.</p>
+ </li>
+ <li><code>x-ua-compatible</code>
+ <p>If specified, the <code>content</code> attribute must have the value "<code>IE=edge</code>". User agents are required to ignore this pragma.</p>
+ </li>
+ <li><code>refresh</code>
+ <div>This instruction specifies:</div>
+
+ <ul>
+ <li>The number of seconds until the page should be reloaded - only if the {{htmlattrxref("content", "meta")}} attribute contains a positive integer.</li>
+ <li>The number of seconds until the page should redirect to another - only if the {{htmlattrxref("content", "meta")}} attribute contains a positive integer followed by the string '<code>;url=</code>', and a valid URL.</li>
+ </ul>
+
+ <h5 id="Accessibility_concerns">Accessibility concerns</h5>
+
+ <div>Pages set with a <code>refresh</code> value run the risk of having the time interval being too short. People navigating with the aid of assistive technology such as a screen reader may be unable to read through and understand the page's content before being automatically redirected. The abrupt, unannounced updating of the page content may also be disorienting for people experiencing low vision conditions.</div>
+
+ <ul>
+ <li><a href="/en-US/docs/Web/Accessibility/Understanding_WCAG/Operable#Guideline_2.2_—_Enough_Time_Provide_users_enough_time_to_read_and_use_content">MDN Understanding WCAG, Guideline 2.1 explanations</a></li>
+ <li><a href="/en-US/docs/Web/Accessibility/Understanding_WCAG/Understandable#Guideline_3.2_—_Predictable_Make_Web_pages_appear_and_operate_in_predictable_ways">MDN Understanding WCAG, Guideline 3.1 explanations</a></li>
+ <li><a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-required-behaviors.html">Understanding Success Criterion 2.2.1 | W3C Understanding WCAG 2.0</a></li>
+ <li><a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/time-limits-postponed.html">Understanding Success Criterion 2.2.4 | W3C Understanding WCAG 2.0</a></li>
+ <li><a href="https://www.w3.org/TR/UNDERSTANDING-WCAG20/consistent-behavior-no-extreme-changes-context.html">Understanding Success Criterion 3.2.5 | W3C Understanding WCAG 2.0</a></li>
+ </ul>
+ </li>
+ </ul>
+ </dd>
+ <dt>{{htmlattrdef("name")}}</dt>
+ <dd>
+ <p>The <code>name</code> and <code>content</code> attributes can be used together to provide document metadata in terms of name-value pairs, with the <code>name</code> attribute giving the metadata name, and the <code>content</code> attribute giving the value.</p>
+
+ <p>See <a href="/en-US/docs/Web/HTML/Element/meta/name">standard metadata names</a> for details about the set of standard metadata names defined in the HTML specification.</p>
+ </dd>
+</dl>
+
+<h2 id="Examples">Examples</h2>
+
+<pre class="brush: html notranslate">&lt;meta charset="utf-8"&gt;
+
+&lt;!-- Redirect page after 3 seconds --&gt;
+&lt;meta http-equiv="refresh" content="3;url=https://www.mozilla.org"&gt;
+</pre>
+
+<h2 id="Specifications">Specifications</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', 'semantics.html#the-meta-element', '&lt;meta&gt;')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td></td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Browser_compatibility">Browser compatibility</h2>
+
+
+
+<div>{{Compat("html.elements.meta")}}</div>