Attributo di estensione delle righe HTML


Definizione e utilizzo

L' rowspanattributo specifica il numero di righe su cui una cella deve occupare.


Si applica a

L' rowspanattributo può essere utilizzato sui seguenti elementi:

Elementi Attributo
<td> intervallo di righe
<i> intervallo di righe

Esempi

Td Esempio

Una tabella HTML con una cella di tabella che si estende su due righe:

<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>

L'esempio

Una tabella HTML con una cella di intestazione che si estende su tre righe:

<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>

Supporto browser

L' rowspanattributo ha il seguente supporto del browser per ogni elemento:

Element
td Yes Yes Yes Yes Yes
th Yes Yes Yes Yes Yes