HTML exercises

HTML CSS Exercise: Zebra table


HTML Code:

<html lang="en">
<meta charset=utf-8>
<title>HTML CSS exercise - CSS3 Zebra Striping a Table</title>
<style type="text/css">
table {
border:1px solid silver
th {
background-color: #ccc;
tbody tr:nth-child(even) {
background-color: #abe113;
<tr><td>1001</td><td>Gopl Murthy</td><td>Physics</td></tr>
<tr><td>1002</td><td>Joy Sen</td><td>Economics</td></tr>
<tr><td>1003</td><td>Chandu Yadav</td><td>Chemistry</td></tr>
<tr><td>1004</td><td>Shalini Gupta</td><td>Zoology</td></tr>
<tr><td>1004</td><td>Vivek Kumar</td><td>Math</td></tr>
<tr><td>1004</td><td>Sameer Ali</td><td>Botany</td></tr>

Live Demo:

See the Pen zebra-table-answer by w3resource (@w3resource) on CodePen.

Supported browser

Firefox logo Chrome logo Opera logo Safari logo Internet Explorer logo

What is the difficulty level of this exercise?

New Content: Composer: Dependency manager for PHP, R Programming

bedava porno