IST129: Chapter 11 - Tables

Tables allow you to segregate content into rows and columns for better readability. The intersection of a row and column is called a cell (like a spreadsheet).

In the next chapter, we will extend the concept of tables into separately scrollable windows called frames.


<TABLE>...</TABLE>

The TABLE tag defines the beginning and end of a table definition within your HTML. All of the following tags will be used within the TABLE tag: The following attributes are useful for the TABLE tag:

<TR>...</TR>

The table row tag creates a new row in the table. The <TH> and <TD> tags go within the TR tags.

<TH>...</TH>

The TH tag contains the header; that is, the title of the column. Text within a TH tag is normally bolded and centered within a cell.

<TD>...</TD>

The TD tags contian the data for a cell.

Sample Table

Student Grades
Student-ID Class-ID Grade
1 IST456 A
2 IST456 B
3 IST456 C

Same table, no borders:

Student Grades
Student-ID Class-ID Grade
1 IST456 A
2 IST456 B
3 IST456 C


Examples:

One field taking up 2 columns:

Header One Header Two---o header three
Detail one Detail two---o Detail three Detail four

One Field taking up 2 rows:

Header One Header Two---o header three
Detail one Detail two---o Detail three Detail four
Detail one Detail two---o Detail three Detail four

One Field taking up 2 columns and 2 rows:

Header One Header Two---o header three
Detail one Detail two---o Detail three Detail four
Detail one Detail two---o Detail three Detail four

There are several more examples in the book starting on page 395.


Your task...

Create a table that looks like the following:

Comic Book Values
Publisher Title Value
Issue #1 Issue #2 Issue #3
DC Superman, Man of Steel $50,000 $10,000 $ 2,500
DC Batman $12,000 $ 3,000 $ 1,000
Marvel X-Men $16,000 $ 3,000 $ 1,000


New HTML4.0 Tags:

<THEAD>...</THEAD>

<TFOOT>...</TFOOT>


The END of Chapter 11