aboutsummaryrefslogtreecommitdiff
path: root/files/ca/web/html/element/thead
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:41:15 -0500
commit4b1a9203c547c019fc5398082ae19a3f3d4c3efe (patch)
treed4a40e13ceeb9f85479605110a76e7a4d5f3b56b /files/ca/web/html/element/thead
parent33058f2b292b3a581333bdfb21b8f671898c5060 (diff)
downloadtranslated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.gz
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.tar.bz2
translated-content-4b1a9203c547c019fc5398082ae19a3f3d4c3efe.zip
initial commit
Diffstat (limited to 'files/ca/web/html/element/thead')
-rw-r--r--files/ca/web/html/element/thead/index.html189
1 files changed, 189 insertions, 0 deletions
diff --git a/files/ca/web/html/element/thead/index.html b/files/ca/web/html/element/thead/index.html
new file mode 100644
index 0000000000..0ec6807d4c
--- /dev/null
+++ b/files/ca/web/html/element/thead/index.html
@@ -0,0 +1,189 @@
+---
+title: <thead>
+slug: Web/HTML/Element/thead
+tags:
+ - Element
+ - HTML
+ - HTML tabular data
+ - Reference
+ - Tables
+ - Web
+translation_of: Web/HTML/Element/thead
+---
+<h2 id="Sumari">Sumari</h2>
+
+<p>L'<em>Element HTML Capçalera de Taula</em> (<code>&lt;thead&gt;</code>) defineix un conjunt de files que defineixen el capçalera de les columnes de la taula.</p>
+
+<h2 id="Context_d'ùs">Context d'ùs</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <td><a href="/en/HTML/Content_categories" title="en/HTML/Content categories">Categories de contingut</a></td>
+ <td>Cap.</td>
+ </tr>
+ <tr>
+ <td>Contingut permès</td>
+ <td>Zero o més elements {{ HTMLElement("tr") }}.</td>
+ </tr>
+ <tr>
+ <td>Omissió de l'etiqueta</td>
+ <td>L'etiqueta d'inici és obligatòria . L'etiqueta final es pot ometre si l'element {{ HTMLElement("thead") }} és seguit immediatament per un {{ HTMLElement("tbody") }} o {{ HTMLElement("tfoot") }}.</td>
+ </tr>
+ <tr>
+ <td>Elements pares permesos</td>
+ <td>Un element {{ HTMLElement("table") }}. L'element {{ HTMLElement("thead") }} ha d'aparèixer després de qualsevol {{ HTMLElement("caption") }} o {{ HTMLElement("colgroup") }} encara que estiguin definits implícitament, però abans de qualsevol {{ HTMLElement("tbody") }}, {{ HTMLElement("tfoot") }} i {{ HTMLElement("tr") }}.</td>
+ </tr>
+ <tr>
+ <td>Normativa del document</td>
+ <td><a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-thead-element" rel="external nofollow" title="http://www.whatwg.org/specs/web-apps/current-work/multipage/tabular-data.html#the-thead-element">HTML5, secció 4.9.6</a> (<a href="http://www.w3.org/TR/REC-html40/struct/tables.html#edef-THEAD" title="http://www.w3.org/TR/REC-html40/struct/tables.html#edef-THEAD">HTML4.01, secció 11.2.3</a>)</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="Atributs">Atributs</h2>
+
+<p>Aquest element inclou els <span style="line-height: 21px;"> </span><a href="https://developer.mozilla.org/en-US/docs/HTML/Global_attributes" style="line-height: 21px;" title="HTML/Global attributes">atributs globals</a><span style="line-height: 21px;">.</span></p>
+
+<dl>
+ <dt>{{ htmlattrdef("align") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}</dt>
+ <dd>Aquest atribut enumerat especifica com s'aplicarà l'alineació horitzontal del contingut de cada cel·la. Els valors possibles són:
+ <ul>
+ <li><code>left</code>, alinea el contingut a l'esquerra de la cel·la</li>
+ <li><code>center</code>, centra el contingut de la cel·la</li>
+ <li><code>right</code>, alinea el contingut a la dreta de la cel·la</li>
+ <li><code>justify</code>, inserta espais en el contingut textual de manera que el contingut es justifica en la cel·la</li>
+ <li><code>char</code>, alinea el contingut textual en un caràcter especial amb una desplaçament mínim definit per els atributs {{ htmlattrxref("char", "thead") }} i {{ htmlattrxref("charoff", "thead") }} {{ unimplemented_inline("2212") }}.</li>
+ </ul>
+
+ <p>Si aquest atribut no està establert, el valor assumit és <code>left</code>.</p>
+
+ <div class="note"><strong>Nota: </strong> No utilitzeu aquest atribut, ja que és obsolet (no suportat) en l'últim estàndard.
+
+ <ul>
+ <li>Per aconseguir el mateix efecte que els valors <span style="font-family: courier new;">left</span>, <span style="font-family: courier new;">center</span>, <span style="font-family: courier new;">right</span> or <span style="font-family: courier new;">justify</span> utilitzeu la propietat CSS {{ cssxref("text-align") }}.</li>
+ <li>Per aconseguir el mateix efecte que el valor <code>char</code>, en CSS3, podeu utilitzar el valor {{ htmlattrxref("char", "thead") }} com el valor de la propietat {{ cssxref("text-align") }} {{ unimplemented_inline() }}.</li>
+ </ul>
+ </div>
+ </dd>
+</dl>
+
+<dl>
+ <dt>{{ htmlattrdef("bgcolor") }} {{ Non-standard_inline() }}</dt>
+ <dd>Aquest atribut defineix el color de fons de cada cel·la de la columna. És un codi hexadecimal de 6 dígits com es defineix en <a class="external" href="http://www.w3.org/Graphics/Color/sRGB" title="http://www.w3.org/Graphics/Color/sRGB">sRGB</a>, prefixat per un '#'. Podeu utilitzar una de les setze cadenes de color predefinits:
+ <table style="width: 80%;">
+ <tbody>
+ <tr>
+ <td style="background-color: black; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">black</span> = "#000000"</td>
+ <td style="background-color: green; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">green</span> = "#008000"</td>
+ </tr>
+ <tr>
+ <td style="background-color: silver; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">silver</span> = "#C0C0C0"</td>
+ <td style="background-color: lime; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">lime</span> = "#00FF00"</td>
+ </tr>
+ <tr>
+ <td style="background-color: gray; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">gray</span> = "#808080"</td>
+ <td style="background-color: olive; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">olive</span> = "#808000"</td>
+ </tr>
+ <tr>
+ <td style="background-color: white; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">white</span> = "#FFFFFF"</td>
+ <td style="background-color: yellow; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">yellow</span> = "#FFFF00"</td>
+ </tr>
+ <tr>
+ <td style="background-color: maroon; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">maroon</span> = "#800000"</td>
+ <td style="background-color: navy; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">navy</span> = "#000080"</td>
+ </tr>
+ <tr>
+ <td style="background-color: red; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">red</span> = "#FF0000"</td>
+ <td style="background-color: blue; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">blue</span> = "#0000FF"</td>
+ </tr>
+ <tr>
+ <td style="background-color: purple; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">purple</span> = "#800080"</td>
+ <td style="background-color: teal; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">teal</span> = "#008080"</td>
+ </tr>
+ <tr>
+ <td style="background-color: fuchsia; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">fuchsia</span> = "#FF00FF"</td>
+ <td style="background-color: aqua; width: 24px; height: 24px; border-width: 1px; border-color: black; border-style: solid;"> </td>
+ <td><span style="font-family: courier new;">aqua</span> = "#00FFFF"</td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div class="note"><strong>Nota d'ùs: </strong> No utilitzeu aquest atribut, ja que no és estàndard i només s'implementa en algunes versions de Microsoft Internet Explorer: l'element {{ HTMLElement("thead") }} se li ha de donar estil amb <a href="/en/CSS" title="en/CSS">CSS</a>. Per donar un efecte similar a l'atribut <strong>bgcolor</strong>, utilitzeu la propietat <a href="/en/CSS" title="en/CSS">CSS</a> {{ cssxref("background-color") }}, en els elements pertinents {{ HTMLElement("td") }} o {{ HTMLElement("th") }}.</div>
+ </dd>
+</dl>
+
+<dl>
+ <dt>{{ htmlattrdef("char") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}</dt>
+ <dd>Aquest atribut s'utilitza per establir el caràcter per alinear les cel·les d'una columna. Els valors típics d'això inclouen un punt (.) en intentar alinear els nombres o valors monetaris. Si {{ htmlattrxref("align", "tr") }} no està establert a <code>char</code>, aquest atribut s'ignora.
+ <div class="note"><strong>Nota: </strong> No utilitzeu aquest atribut, ja que és obsolet (i no està suportat) en l'últim estàndard. Per aconseguir el mateix efecte que {{ htmlattrxref("char", "thead") }}, en CSS3, podeu utilitzar el joc de caràcters utilitzant l'atribut {{ htmlattrxref("char", "thead") }} com el valor de la propietat {{ cssxref("text-align") }} {{ unimplemented_inline() }}.</div>
+ </dd>
+</dl>
+
+<dl>
+ <dt>{{ htmlattrdef("charoff") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}</dt>
+ <dd>Aquest atribut s'utilitza per indicar el nombre de caràcters a desplaçar de les dades de la columna dels caràcters d'alineació especificats per l'atribut <strong>char</strong>.
+ <div class="note"><strong>Nota: </strong> No utilitzeu aquest atribut, ja que és obsolet (i no està suportat) en l'últim estàndard.</div>
+ </dd>
+</dl>
+
+<dl>
+ <dt>{{ htmlattrdef("valign") }} {{ Deprecated_inline() }} in {{ HTMLVersionInline("4") }}, {{ obsolete_inline() }} in {{ HTMLVersionInline("5") }}</dt>
+ <dd>Aquest atribut especifica l'alineació vertical del text dins de cada fila de cel·les de la capçalera de la taula. Els valors possibles per aquest atribut són:
+ <ul>
+ <li><span style="font-family: courier new;">baseline</span>, posarà el text tan a prop de la part inferior de la cel·la com sigui possible, però alineant-ho en la <a href="http://en.wikipedia.org/wiki/Baseline_%28typography%29">línia de base (baseline)</a> dels caràcters en lloc de la part inferior d'ells. Si els caràcters són tots de la mida, això té el mateix efecte que <span style="font-family: courier new;">bottom</span></li>
+ <li><span style="font-family: courier new;">bottom</span>, posarà el text tan a prop de la part inferior de la cel·la com sigui possible;</li>
+ <li><span style="font-family: courier new;">middle</span>, centra el text en la cel·la;</li>
+ <li><span style="font-family: courier new;">top</span>, posarà el text tant a prop de la part superior de la cel·la com sigui possible.</li>
+ </ul>
+
+ <div class="note"><strong>Nota: </strong> No utilitzeu aquest atribut, ja que és obsolet (i no està suportat) en l'últim estàndard: en el seu lloc aplicar la propietat CSS {{ cssxref("vertical-align") }}.</div>
+ </dd>
+</dl>
+
+<h2 id="Interfície_DOM">Interfície DOM</h2>
+
+<p>Aquest element implementa la interfície <code><a href="/en/docs/Web/API/HTMLTableSectionElement" title="en/DOM/HTMLTableSectionElement">HTMLTableSectionElement</a></code>.</p>
+
+<h2 id="Exemples">Exemples</h2>
+
+<p>Veure {{ HTMLElement("table") }} per exemples de <code> &lt;thead&gt;</code>.</p>
+
+<h2 id="Navegadors_compatibles">Navegadors compatibles</h2>
+
+<div>
+
+
+<p>{{Compat("html.elements.thead")}}</p>
+</div>
+
+<p> </p>
+
+<h2 id="Veure">Veure</h2>
+
+<ul>
+ <li>Altres elements HTML relacionats amb taules: {{ HTMLElement("caption") }}, {{ HTMLElement("col") }}, {{ HTMLElement("colgroup") }}, {{ HTMLElement("table") }}, {{ HTMLElement("tbody") }}, {{ HTMLElement("td") }}, {{ HTMLElement("tfoot") }}, {{ HTMLElement("th") }}, {{ HTMLElement("tr") }};</li>
+ <li>Propietats CSS i pseudo-classes que poden ser especialment útils per a l'estil de l'element <span style="font-family: courier new;">&lt;thead&gt;</span>:
+ <ul>
+ <li>la pseudo-classe {{ cssxref(":nth-child") }} per ajustar l'alineació de les cel·les de la columna;</li>
+ <li>la propietat {{ cssxref("text-align") }} per alinear el contingut de totes les cel·les en el mateix caràcter, com '.'. &lt;</li>
+ </ul>
+ </li>
+</ul>
+
+<p>{{HTMLRef}}</p>