Atribut HTML rowspan
Definice a použití
Atribut rowspan
určuje počet řádků, které by měla buňka obsahovat.
Platí pro
Atribut rowspan
lze použít u následujících prvků:
Prvky | Atribut |
---|---|
<td> | rozpětí řádků |
<th> | rozpětí řádků |
Příklady
Příklad Td
Tabulka HTML s buňkou tabulky, která zahrnuje dva řádky:
<table>
<tr>
<th>Month</th>
<th>Savings</th>
<th>Savings for holiday!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
<td rowspan="2">$50</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Příklad
HTML tabulka s buňkou záhlaví, která zahrnuje tři řádky:
<table>
<tr>
<th>Month</th>
<th>Savings</th>
<th rowspan="3">Savings for holiday!</th>
</tr>
<tr>
<td>January</td>
<td>$100</td>
</tr>
<tr>
<td>February</td>
<td>$80</td>
</tr>
</table>
Podpora prohlížeče
Atribut rowspan
má následující podporu prohlížeče pro každý prvek:
Element | |||||
---|---|---|---|---|---|
td | Yes | Yes | Yes | Yes | Yes |
th | Yes | Yes | Yes | Yes | Yes |