1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
---
title: head
slug: Web/HTML/Element/head
tags:
- HTML
- HTML:Elemento
- Metadatos de documento HTML
- Todas_las_Categorías
translation_of: Web/HTML/Element/head
original_slug: Web/HTML/Elemento/head
---
<div>{{HTMLRef}}</div>
<p>El <strong>elemento HTML <code><head></code></strong> provee información general (metadatos) acerca del documento, incluyendo su título y enlaces a scripts y hojas de estilos.</p>
<table class="properties">
<tbody>
<tr>
<th><a href="/es/docs/Web/Guide/HTML/categorias_de_contenido">Categorías de contenido</a></th>
<td>Ninguna.</td>
</tr>
<tr>
<th>Contenido permitido</th>
<td>Si el elemento es un {{htmlattrxref("srcdoc", "iframe")}} de un {{HTMLElement("iframe")}} , o si la información de título está disponible desde un protocolo de nivel superior, cero o más elementos de metadatos.<br>
De otro modo, uno o más elementos de metadatos donde exactamente uno es {{HTMLElement("title")}}.</td>
</tr>
<tr>
<th>Omisión de etiqueta</th>
<td>La etiqueta de inicio puede ser omitida si lo primero dentro del elemento head es un elemento.<br>
La etiqueta de cierre puede ser omitida si lo primero después del elemento head no es un espacio o un comentario.</td>
</tr>
<tr>
<th>Elementos padre permitidos</th>
<td>Un elemento {{HTMLElement("html")}}, pues éste es su primer hijo.</td>
</tr>
<tr>
<th>Interfaz DOM</th>
<td>{{domxref("HTMLHeadElement")}}</td>
</tr>
</tbody>
</table>
<h2 id="Atributos">Atributos</h2>
<p>Este elemento incluye los <a href="/es/docs/Web/HTML/Global_attributes">atributos globales</a>.</p>
<dl>
<dt>{{htmlattrdef("profile")}} {{obsolete_inline}}</dt>
<dd>Los URIs de uno o más perfiles de metadatos, separados por un espacio en blanco.</dd>
</dl>
<h2 id="Ejemplo">Ejemplo</h2>
<pre class="brush: html"><html>
<head>
<title>Document title</title>
</head>
</html>
</pre>
<h2 id="Notas">Notas</h2>
<p>Navegadores modernos que cumplen con el estándar HTML5 construyen automáticamente un elemento <code><head></code> si las etiquetas son omitidas en el código. <a class="external" href="http://www.stevesouders.com/blog/2010/05/12/autohead-my-first-browserscope-user-test/">Este comportamiento no puede ser garantizado en navegadores antiguos</a>.</p>
<h2 id="Especificaciones">Especificaciones</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Especificación</th>
<th scope="col">Estatus</th>
<th scope="col">Comentarios</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('HTML WHATWG', 'semantics.html#the-head-element', '<head>')}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>Sin cambios desde la última versión</td>
</tr>
<tr>
<td>{{SpecName('HTML5 W3C', 'document-metadata.html#the-head-element', '<head>')}}</td>
<td>{{Spec2('HTML5 W3C')}}</td>
<td>Atributo <code>profile</code> obsoleto</td>
</tr>
<tr>
<td>{{SpecName('HTML4.01', 'struct/global.html#h-7.4.1', '<head>')}}</td>
<td>{{Spec2('HTML4.01')}}</td>
<td> </td>
</tr>
</tbody>
</table>
<h2 id="Compatibilidad_de_navegadores">Compatibilidad de navegadores</h2>
{{Compat("html.elements.head")}}
<h2 id="Véase_también">Véase también</h2>
<ul>
<li>Elementos que pueden ser usados dentro de un elemento <code><head>:</code> {{HTMLElement("title")}}, {{HTMLElement("base")}}, {{HTMLElement("link")}}, {{HTMLElement("style")}}, {{HTMLElement("meta")}}, {{HTMLElement("script")}}, {{HTMLElement("noscript")}}</li>
</ul>
|