summaryrefslogtreecommitdiff
path: root/devdocs/html/element%2Fhead.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/html/element%2Fhead.html
new repository
Diffstat (limited to 'devdocs/html/element%2Fhead.html')
-rw-r--r--devdocs/html/element%2Fhead.html93
1 files changed, 93 insertions, 0 deletions
diff --git a/devdocs/html/element%2Fhead.html b/devdocs/html/element%2Fhead.html
new file mode 100644
index 00000000..4597cb8d
--- /dev/null
+++ b/devdocs/html/element%2Fhead.html
@@ -0,0 +1,93 @@
+<header><h1>&lt;head&gt;: The Document Metadata (Header) element</h1></header><div class="section-content">
+<p>The <code>&lt;head&gt;</code> <a href="../index">HTML</a> element contains machine-readable information (<a href="https://developer.mozilla.org/en-US/docs/Glossary/Metadata">metadata</a>) about the document, like its <a href="title">title</a>, <a href="script">scripts</a>, and <a href="style">style sheets</a>.</p> <div class="notecard note" id="sect1"> <p><strong>Note:</strong> <code>&lt;head&gt;</code> primarily holds information for machine processing, not human-readability. For human-visible information, like top-level headings and listed authors, see the <a href="header"><code>&lt;header&gt;</code></a> element.</p> </div>
+</div>
+<h2 id="attributes">Attributes</h2>
+<div class="section-content">
+<p>This element includes the <a href="../global_attributes">global attributes</a>.</p> <dl> <dt id="profile">
+<a href="#profile"><code>profile</code></a> <abbr class="icon icon-deprecated" title="Deprecated. Not for use in new websites."> <span class="visually-hidden">Deprecated</span> </abbr> <abbr class="icon icon-nonstandard" title="Non-standard. Check cross-browser support before using."> <span class="visually-hidden">Non-standard</span> </abbr>
+</dt> <dd> <p>The <a href="https://developer.mozilla.org/en-US/docs/Glossary/URI">URI</a>s of one or more metadata profiles, separated by <a href="https://developer.mozilla.org/en-US/docs/Glossary/Whitespace">white space</a>.</p> </dd> </dl>
+</div>
+<h2 id="examples">Examples</h2>
+<div class="section-content"><div class="code-example">
+<p class="example-header"><span class="language-name">html</span></p>
+<pre data-signature="yXjwe/c/5BBR2/0Xj76DfRIM40/zDF5hKNrUillhYE0=" data-language="html"><span class="token doctype"><span class="token punctuation">&lt;!</span><span class="token doctype-tag">doctype</span> <span class="token name">html</span><span class="token punctuation">&gt;</span></span>
+<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>html</span> <span class="token attr-name">lang</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>en-US<span class="token punctuation">"</span></span><span class="token punctuation">&gt;</span></span>
+ <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>head</span><span class="token punctuation">&gt;</span></span>
+ <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">charset</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>UTF-8<span class="token punctuation">"</span></span> <span class="token punctuation">/&gt;</span></span>
+ <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>meta</span> <span class="token attr-name">name</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>viewport<span class="token punctuation">"</span></span> <span class="token attr-name">content</span><span class="token attr-value"><span class="token punctuation attr-equals">=</span><span class="token punctuation">"</span>width=device-width<span class="token punctuation">"</span></span> <span class="token punctuation">/&gt;</span></span>
+ <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>title</span><span class="token punctuation">&gt;</span></span>Document title<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>title</span><span class="token punctuation">&gt;</span></span>
+ <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>head</span><span class="token punctuation">&gt;</span></span>
+<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>html</span><span class="token punctuation">&gt;</span></span>
+</pre>
+</div></div>
+<h2 id="technical_summary">Technical summary</h2>
+<div class="section-content"><figure class="table-container"><div class="_table"><table class="properties"> <tbody> <tr> <th scope="row"><a href="../content_categories">Content categories</a></th> <td>None.</td> </tr> <tr> <th scope="row">Permitted content</th> <td> <p> If the document is an <a href="iframe"><code>&lt;iframe&gt;</code></a> <a href="iframe#srcdoc"><code>srcdoc</code></a> document, or if title information is available from a higher level protocol (like the subject line in HTML email), zero or more elements of metadata content. </p> <p> Otherwise, one or more elements of metadata content where exactly one is a <a href="title"><code>&lt;title&gt;</code></a> element. </p> </td> </tr> <tr> <th scope="row">Tag omission</th> <td> The start tag may be omitted if the first thing inside the <code>&lt;head&gt;</code> element is an element.<br>The end tag may be omitted if the first thing following the <code>&lt;head&gt;</code> element is not a space character or a comment. </td> </tr> <tr> <th scope="row">Permitted parents</th> <td>An <a href="html"><code>&lt;html&gt;</code></a> element, as its first child.</td> </tr> <tr> <th scope="row">Implicit ARIA role</th> <td><a href="https://www.w3.org/TR/html-aria/#dfn-no-corresponding-role" target="_blank">No corresponding role</a></td> </tr> <tr> <th scope="row">Permitted ARIA roles</th> <td>No <code>role</code> permitted</td> </tr> <tr> <th scope="row">DOM interface</th> <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLHeadElement"><code>HTMLHeadElement</code></a></td> </tr> </tbody> </table></div></figure></div>
+<h2 id="specifications">Specifications</h2>
+<div class="_table"><table class="standard-table">
+<thead><tr><th scope="col">Specification</th></tr></thead>
+<tbody><tr><td><a href="https://html.spec.whatwg.org/multipage/semantics.html#the-head-element">HTML Standard <br><small># the-head-element</small></a></td></tr></tbody>
+</table></div>
+<h2 id="browser_compatibility">Browser compatibility</h2>
+<div class="_table"><table>
+<thead>
+<tr id="bct-browser-type">
+<th></th>
+<th colspan="6">Desktop</th>
+<th colspan="6">Mobile</th>
+</tr>
+<tr id="bct-browsers">
+<th></th>
+<th>Chrome</th>
+<th>Edge</th>
+<th>Firefox</th>
+<th>Internet Explorer</th>
+<th>Opera</th>
+<th>Safari</th>
+<th>WebView Android</th>
+<th>Chrome Android</th>
+<th>Firefox for Android</th>
+<th>Opera Android</th>
+<th>Safari on IOS</th>
+<th>Samsung Internet</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<th><code>head</code></th>
+<td class="bc-supports-yes">1</td>
+<td class="bc-supports-yes">12</td>
+<td class="bc-supports-yes">1</td>
+<td class="bc-supports-yes">Yes</td>
+<td class="bc-supports-yes">15</td>
+<td class="bc-supports-yes">1</td>
+<td class="bc-supports-yes">4.4</td>
+<td class="bc-supports-yes">18</td>
+<td class="bc-supports-yes">4</td>
+<td class="bc-supports-yes">14</td>
+<td class="bc-supports-yes">1</td>
+<td class="bc-supports-yes">1.0</td>
+</tr>
+<tr>
+<th><code>profile</code></th>
+<td class="bc-supports-yes">1</td>
+<td class="bc-supports-yes">12</td>
+<td class="bc-supports-yes">1</td>
+<td class="bc-supports-yes">Yes</td>
+<td class="bc-supports-yes">15</td>
+<td class="bc-supports-no">1–16.4</td>
+<td class="bc-supports-yes">4.4</td>
+<td class="bc-supports-yes">18</td>
+<td class="bc-supports-yes">4</td>
+<td class="bc-supports-yes">14</td>
+<td class="bc-supports-no">1–16.4</td>
+<td class="bc-supports-yes">1.0</td>
+</tr>
+</tbody>
+</table></div>
+<h2 id="see_also">See also</h2>
+<div class="section-content"><ul> <li>Elements that can be used inside the <code>&lt;head&gt;</code>: <ul> <li><a href="title"><code>&lt;title&gt;</code></a></li> <li><a href="base"><code>&lt;base&gt;</code></a></li> <li><a href="link"><code>&lt;link&gt;</code></a></li> <li><a href="style"><code>&lt;style&gt;</code></a></li> <li><a href="meta"><code>&lt;meta&gt;</code></a></li> <li><a href="script"><code>&lt;script&gt;</code></a></li> <li><a href="noscript"><code>&lt;noscript&gt;</code></a></li> <li><a href="template"><code>&lt;template&gt;</code></a></li> </ul> </li> </ul></div><div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2005&ndash;2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br>
+ <a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/head</a>
+ </p>
+</div>