aboutsummaryrefslogtreecommitdiff
path: root/files/it/web/api/document/head
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:42:17 -0500
commitda78a9e329e272dedb2400b79a3bdeebff387d47 (patch)
treee6ef8aa7c43556f55ddfe031a01cf0a8fa271bfe /files/it/web/api/document/head
parent1109132f09d75da9a28b649c7677bb6ce07c40c0 (diff)
downloadtranslated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.gz
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.tar.bz2
translated-content-da78a9e329e272dedb2400b79a3bdeebff387d47.zip
initial commit
Diffstat (limited to 'files/it/web/api/document/head')
-rw-r--r--files/it/web/api/document/head/index.html84
1 files changed, 84 insertions, 0 deletions
diff --git a/files/it/web/api/document/head/index.html b/files/it/web/api/document/head/index.html
new file mode 100644
index 0000000000..941a533431
--- /dev/null
+++ b/files/it/web/api/document/head/index.html
@@ -0,0 +1,84 @@
+---
+title: Document.head
+slug: Web/API/Document/head
+tags:
+ - API
+ - Document
+ - HTML DOM
+ - Proprietà
+ - Referenza
+translation_of: Web/API/Document/head
+---
+<div>{{APIRef("DOM")}}</div>
+
+<p><span class="seoSummary">La proprietà <code><strong>head</strong></code> di sola lettura dell'interfaccia {{domxref("Document")}} restituisce l'elemento {{HTMLElement("head")}} del documento corrente.</span></p>
+
+<h2 id="Sintassi">Sintassi</h2>
+
+<pre class="syntaxbox">var <var>objRef</var> = document.head;
+</pre>
+
+<h3 id="Valore">Valore</h3>
+
+<p>Un {{domxref("HTMLHeadElement")}}.</p>
+
+<h2 id="Esempio">Esempio</h2>
+
+<pre class="brush: html">&lt;!doctype html&gt;
+&lt;head id="my-document-head"&gt;
+ &lt;title&gt;Esempio: usare document.head&lt;/title&gt;
+&lt;/head&gt;
+
+&lt;script&gt;
+ var theHead = document.head;
+
+ console.log(theHead.id); // "my-document-head";
+
+ console.log( theHead === document.querySelector("head") ); // true
+&lt;/script&gt;
+</pre>
+
+<h2 id="Appunti">Appunti</h2>
+
+<p><code>document.head</code> è di sola lettura. Cercare di assegnare un valore a questa proprietà fallirà silenziosamente o, in <a href="/en-US/docs/Web/JavaScript/Reference/Strict_mode">Strict Mode</a>, genera un {{jsxref("TypeError")}} .</p>
+
+<h2 id="Specifiche">Specifiche</h2>
+
+<table class="spectable standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specifica</th>
+ <th scope="col">Stato</th>
+ <th scope="col">Commento</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML5.1','dom.html#dom-document-head','Document.head')}}</td>
+ <td>{{Spec2('HTML5.1')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML5 W3C','dom.html#dom-document-head','Document.head')}}</td>
+ <td>{{Spec2('HTML5 W3C')}}</td>
+ <td> </td>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG','dom.html#dom-document-head','Document.head')}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Definizione iniziale.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Compatibilità_con_i_browser">Compatibilità con i browser</h2>
+
+
+
+<p>{{Compat("api.Document.head")}}</p>
+
+<h2 id="Vedi_anche">Vedi anche</h2>
+
+<ul>
+ <li>{{domxref("document.body")}}</li>
+</ul>