|
Si ponga il caso di una tabella come la seguente:
<table border=1>
<tr>
<td>testo</td>
<td>testo</td>
<td>testo</td>
</tr>
<tr>
<td>testo</td>
<td>testo lungo</td>
</tr>
</table>
Se si vuole che lultimo <td>, cioè testo lungo occupi anche la terza casella in basso, bisogna usare colspan.
Ecco il risultato usando colspan e indicando che il <td> occupa 2 caselle:
<table border=1>
<tr>
<td>testo</td>
<td>testo</td>
<td>testo</td>
</tr>
<tr>
<td>testo</td>
<td colspan=2>testo lungo</td>
</tr>
</table>
La stessa cosa vale per rowspan, ma questo indica che occupa più di una riga, come nellesempio:
<table border=1>
<tr>
<td>testo</td>
<td>testo</td>
<td>testo</td>
</tr>
<tr>
<td rowspan= 2>testo</td>
<td>testo</td>
<td>testo</td>
</tr>
<tr>
<td>testo</td>
<td>testo</td>
</tr>
</table>
|
|