<col> (tag HTML) stabilisce le proprietà (stile, estensione) delle colonne di una tabella. Ha come padre necessario il tag HTML <colgroup> e come ascendente necessario il tag HTML <table>.
attributi
speciali
Caricamento…
globali
Caricamento…
scheda tecnica
– Contenuto: nessuno
– Tipo: invisibile
– Intefraccia DOM: HTMLTableColElement
– Supporto browser: totale
Sintassi
<table> <colgroup> <col [attributi] /> </colgroup> <tr><td></td></tr> </table>
Default CSS
col {
display: table-column;
}
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 |
Contenuti correlati
- CSS
- HTML
<colgroup>(padre necessario)<table>(ascendente necessario)
- JavaScript
- jQuery
- PHP
- SQL
- WORDPRESS
0 Comment