8. Tables

While tables do not play as important a role as lists, they are useful. This exercise requires several tables, both simple and complex, to demonstrate their variety.

This page will consist (almost) entirely of tables, of which there will be at least three. The first will be a simple, two-column table, similar to this:

simple table

The second will makes use of a header row and a caption, similar to this:

table 2

The third will add thead, tbody, tfoot, and a colgroup:

table 2

The fourth will have a presentation goal: zebra striping, or alternating row backgrounds:

table 2

This is easily accomplished by using the :nth-child pseudo-element, as:

#zebra tr:nth-child(odd)
	background: rgba(255, 245, 198, .75);

The same flexible layout from the previous exercise will be used.


  1. This file must contain anchors back to your home page and the index page for exercises.
  2. As with the all assignments, once the local version is finished and tested, upload the changes to the server, and test from there.