HTML and CSS Reference
1. The basic parts of a table (the <table> tag) are the border (defined with the border
attribute), caption (defined with the <caption> tag), header cells ( <th> ), data cells
( <td> ), and table rows ( <tr> ).
2. The border attribute is the most common attribute for the table tag. It specifies
whether border lines are displayed around the table and how wide the borders
3. cellpadding defines the amount of space between the edges of the cell and their
contents. cellspacing defines the amount of space between the cells.
4. The rowspan attribute creates a cell that spans multiple rows. The colspan attribute
creates a cell that spans multiple columns.
5. <thead> , <tbody> , and <tfoot> define the head, body, and foot of a table.
1. Here's a brainteaser for you: Create a simple nested table (a table within a table)
that contains three rows and four columns. Inside the cell that appears at the sec-
ond column in the second row, create a second table that contains two rows and
2. One tricky aspect of working with the HTML for tables is accounting for cells with
no data. Create a table that includes empty cells and verify that when you've done
so, all the rows and columns line up as you originally anticipated.