Attributo HTML <th> rowspan
Definizione e uso
rowspan
L'attributo definisce il numero di righe che la cella di intestazione deve coprire.
Esempio
Esempio 1
HTML tabella con cella di intestazione che copre tre righe:
<table> <tr> <th>Mese</th> <th>Deposito</th> <th rowspan="3">Risparmi per le festività!</th> </tr> <tr> <td>Giugno</td> <td>¥3000</td> </tr> <tr> <td>Febbraio</td> <td>¥4000</td> </tr> </table>
Esempio 2
Esempio 2: utilizzare rowspan="0" (aperto a Chrome, Firefox e Opera):
<table> </thead> <tr> <th>Mese</th> <th>Deposito</th> <th rowspan="3">Risparmi per le festività!</th> </tr> </thead> </tbody> <tr> <td>Giugno</td> <td>¥3000</td> <td rowspan="0">¥3500</td> </tr> <tr> <td>Febbraio</td> <td>¥4000</td> </tr> </tbody> </table>
Sintassi
<th rowspan="number">
Valore dell'attributo
Valore | Descrizione |
---|---|
number |
Impostare il numero di righe che la cella di intestazione deve coprire. Attenzione:rowspan="0" informa il browser di estendere la cella all'ultima riga della sezione tabella (thead, tbody o tfoot). |
Supporto browser
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Supporto | Supporto | Supporto | Supporto | Supporto |