Using CSS :
CSS provides a pseudo selector which selects alternate tr of table and applies specified properties.:nth-child() is the selector which works for us.
This selector is not supported in all browser.Example :

In the above example, we have created a table element. We have used :nth-child(even) selector to select all the even tr of table and applied css to it. We have done same thing for odd tr's.

Using jQuery :
We can also use jQuery to apply style to alternate tr's of the table. In jQuery we have even and odd selector to select the respective tr's of table. We will define CSS classes which we will add using addClass() method.Example :

In the above demo we have achieved same what we achieved using CSS. In the above example, we have created two CSS classes one for all odd tr's and one for all even tr's. On document ready we selected the even tr's using even selector in jQuery and applied CSS by adding the CSS class using addClass() method.

So, we could achieve the alternate tr styling using both CSS and jQuery.