Tabella a righe modello zebra
Titolo della colonna 1 | Titolo della colonna 2 |
---|---|
Cella 1 | Cella 2 |
Cella 3 | Cella 4 |
Cella 5 | Cella 6 |
Codice HTML
<table border='1' width='400px' align='center'> <tr> <th>Titolo della colonna 1</th> <th>Titolo della colonna 2</th> </tr>
<tr> <td align='center'>Cella 1</td> <td align='center'>Cella 2</td> </tr> <tr> <td align='center'>Cella 3</td> <td align='center'>Cella 4</td> </tr> <tr> <td align='center'>Cella 5</td> <td align='center'>Cella 6</td> </tr> </table>
Codice CSS
tr:nth-child(even) { background-color: #f2f2f2 }