Web Development and Design Foundations with XHTML, 5th Edition

(Steven Felgate) #1
8.3 Using CSS to Style a Table^337

The XHTML code for the table follows.





































Time Sheet
Day Hours
Total 18
Monday 4
Tuesday 3
Wednesday 5
Thursday 3
Friday 3

The example above demonstrates the power of CSS in styling documents. The tags
within each table row group selector (, , and ) inherited the
font styles configured for their parent group selector. Notice how a descendent selector
(refer back to Chapter 6) configures padding and border only for tags that are
contained within (actually, “children of”) the element. A file with the code
shown above is located in the student files (Chapter8/tables/tfoot.html). Take a few
moments to explore the Web page code and display the page in a browser.

Free download pdf