Set different colors for alternate rows of a table.
EasyProblem Statement
Set different colors for alternate rows of a table.
Sample Input
A webpage with a <table> element.
Sample Output
The alternate rows of the table have different background colors.
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
<!DOCTYPE html>
<html>
<head>
<style>
/* Add CSS here to style the table */
</style>
</head>
<body>
<table>
<tr><td>Row 1</td></tr>
<tr><td>Row 2</td></tr>
<tr><td>Row 3</td></tr>
<tr><td>Row 4</td></tr>
</table>
</body>
</html>
Document
To view the HTML changes, please type the code within the editor