Sams Teach Yourself HTML, CSS & JavaScript Web Publishing in One Hour a Day

(singke) #1
ptg16476052

Table Parts 245

10


The top row is followed by three rows of data cells, which are coded as follows:



Alison
5'4"
140
Blue


Tom
6'0"
165
Blue


Susan
5'1"
97
Brown

As you’ve seen, you can place the headings along the top edge by defining the ele-
ments inside the first row. Let’s make a slight modification to the table. You’ll put the
headings along the left edge of the table instead. To accomplish this, put each in the
first cell in each row and follow it with the data that pertains to each heading. The new
code looks like the following:


Input ▼



Name
Alison
Tom
Susan


Height
5'4"
6'0"
5'1"


Weight
140
165
97


Eye Color
Free download pdf