Zebra-striping

Rows

This is a nonsense table
ID Age Height Occupation Hobbies
Data accurate as of August 2010
Harry Roberts 001 20 6′4″ Web Developer Trials
Joe Whitley 002 20 6′1″ Sports Journalist Golf
Laura Jones 003 22 5′5″ Florist Pub darts
José Edwards 004 19 6′ Candlestick Maker Singing
Sally Rodgers 005 35 5′7″ Copywriter Bodybuilding
Herbert Smythe 006 12 4′11″ Student Cage fighting
John Smith 007 28 5′11″ Fishmonger Cross-stitch
tbody tr:nth-of-type(odd){
  background:rgba(255,255,136,0.5);
}

Columns

This is a nonsense table
ID Age Height Occupation Hobbies
Data accurate as of August 2010
Harry Roberts 001 20 6′4″ Web Developer Trials
Joe Whitley 002 20 6′1″ Sports Journalist Golf
Laura Jones 003 22 5′5″ Florist Pub darts
José Edwards 004 19 6′ Candlestick Maker Singing
Sally Rodgers 005 35 5′7″ Copywriter Bodybuilding
Herbert Smythe 006 12 4′11″ Student Cage fighting
John Smith 007 28 5′11″ Fishmonger Cross-stitch
tbody td:nth-of-type(odd),
thead th:nth-of-type(odd){
  background:rgba(255,255,136,0.5);
}

Both

This is a nonsense table
ID Age Height Occupation Hobbies
Data accurate as of August 2010
Harry Roberts 001 20 6′4″ Web Developer Trials
Joe Whitley 002 20 6′1″ Sports Journalist Golf
Laura Jones 003 22 5′5″ Florist Pub darts
José Edwards 004 19 6′ Candlestick Maker Singing
Sally Rodgers 005 35 5′7″ Copywriter Bodybuilding
Herbert Smythe 006 12 4′11″ Student Cage fighting
John Smith 007 28 5′11″ Fishmonger Cross-stitch
tbody td:nth-of-type(odd),
tbody tr:nth-of-type(odd),
thead th:nth-of-type(odd){
  background:rgba(255,255,136,0.5);
}

Return to the article.