|
|
|
|
|
|

spacer

TABLES 


Tables are used quite widely in HTML documents as they enable designers to create and control the structure of documents. Tables tags include a wide variety of attributes and elements [See Syntax].
Understanding and mastering the use of tables in HTML is very important in becoming a good web document designer.

SYNTAX

<TABLE

ALIGN="LEFT|RIGHT"

BGCOLOR="color"

BORDER="value"

CELLPADDING="value"

CELLSPACING="value"

HEIGHT="height"

WIDTH="width"

HSPACE="horizMargin"

VSPACE="vertMargin">

...

</TABLE>



RESOURCES

Castro Chapter 9


EXERCISE

PART 1

Produce an HTML document that includes the following:

<TABLE BGCOLOR=yellow BORDER CELLPADDING="8" CELLSPACING="4">

<TR><TH>English</TH><TH>Spanish</TH>
<TH>German</TH></TR>

<TR><TD>one</TD><TD>uno</TD>
<TD>ein</TD></TR>

<TR><TD>two</TD><TD>dos</TD>
<TD>zwei</TD></TR>

<TR><TD>three</TD><TD>tres</TD>
<TD>drei</TD></TR>

<CAPTION ALIGN="BOTTOM"><B>Table 1</B>: Tables are as easy as one, two, three
</CAPTION>

</TABLE>

PART 2

Vary the following elements:
Background colour: #DDEEAA
Column width: 100
Border width: 3
Add a column and another language


PART 3

Set the background colour of the headings to NAVY and the text colour of the headings to WHITE. Set the border colour to NAVY