<colgroup> (tag HTML) stabilisce le proprietà (stile, estensione) delle colonne di una tabella. Annidato nel tag HTML <table>, deve necessariamente trovarsi dopo il tag HTML <caption> e prima dei tag HTML <thead>, <tbody>, <tfoot> e <tr>.
attributi
speciali
Caricamento…
globali
Caricamento…
scheda tecnica
– Contenuto: nessuno
– Tipo: [in costruzione]
– Intefraccia DOM: HTMLTableColElement
– Supporto browser: totale
Sintassi
<table> <colgroup> <col></col> </colgroup> <tr><td></td></tr> </table>
Default CSS
colgroup {
display: table-column-group;
}
Esempio
<table>
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:yellow">
</colgroup>
<tr>
<th>ISBN</th>
<th>Titolo</th>
<th>Prezzo</th>
</tr>
<tr>
<td>123456789</td>
<td>Gestiolex</td>
<td>€ 100</td>
</tr>
</table>
| ISBN | Titolo | Prezzo |
|---|---|---|
| 123456789 | Gestiolex | € 100 |
0 Comment