i am using a table with alternate row color with this.
css
tr.d0 td {
background-color: #CC9999; color: black;
}
tr.d1 td {
background-color: #9999CC; color: black;
}
html
<table>
<tr class="d0"><td>One</td><td>one</td></tr>
<tr class="d1"><td>Two</td><td>two</td></tr>
</table>
here i am using class for tr
but i want to use only for table
. when i use class for table than this apply on tr
alternative.
can i write my html like this with use css ?
<table class="alternate_color">
<tr><td>One</td><td>one</td></tr>
<tr><td>Two</td><td>two</td></tr>
</table>
is there a way to make like this?