Example
table id="t01">
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
<tr>
<th>Firstname</th>
<th>Lastname</th>
<th>Age</th>
</tr>
<tr>
<td>Eve</td>
<td>Jackson</td>
<td>94</td>
</tr>
</table>
Now you can define a special style for this table:
table#t01 {
width: 100%;
background-color: #f1f1c1;}
width: 100%;
background-color: #f1f1c1;}
And add more styles:
table#t01 tr:nth-child(even) {
background-color: #eee;}
table#t01 tr:nth-child(odd) {
background-color: #fff;}
table#t01 th {
color: white;
background-color: black;}
background-color: #eee;}
table#t01 tr:nth-child(odd) {
background-color: #fff;}
table#t01 th {
color: white;
background-color: black;}
Tidak ada komentar:
Posting Komentar