About usContact usSite help
Quick links
Search this site

Webpage Creation - Step 5

Tables continued

Well, you've made it Thus far, shall we delve into tables a little more.

It was mentioned in Step 4 about table attributes. We should look at a couple more so that you can start creating really complicated tables.

We have already seen the border="1" attribute, I'll leave you to experiment on what numbers you can use there, and what will happen.

Below is a table of some of the attributes you can use in tables. Note: The following table has 3 columns and 10 rows

Tag

Attribute

Use

table

border="x"

Where x is a number
0 [zero] = No border
The number specifies how many pixels wide the border should be.

table

cellpadding="x"

Where x is a number
The amount of space around the content of the cell

table

cellspacing="x"

Where x is a number
The amount of space between cells

table

bordercolor="x"

Where x is a color
This can be hexadecimal or text

table

bordercolorlight="x"

As bordercolor
Borders are split into two types, light and dark, this attribute relates to the light section of the border

table

bordercolordark="x"

As bordercolor
This realates to the dark section of the border

table
td

width="x"

Where x is a number, this can also be a percentage
This number will be in pixels, or a percentage of the overall width the table can occupy
This can be within another table if you wish

table
tr
td

background="x"

Where x is a number, or a reference to an image
i.e. background="mypic.gif"

td

colspan="x"

Where x is a number
The number of columns to span
This table has 3 columns and 10 rows

td

rowspan="x"

Where x is a number
The nubmer of rows to span
This table has 3 columns and 10 rows

td

valign="x"

Where x is a position, options are: top, middle or bottom

td

align="x"

Where x is a position, options are: left, center or right

Please note: the American spelling, i.e. color. You will find this a lot in HTML and other similar languages.
Basically, if you have written a piece of code, and you get unexpected results, go back and check your spelling.

Please note: This is by no means a definitive list, this is a list of the most commonly used tags and attributes.

Seven easy steps - start from the begining or skip to the section you want:

Step 5


 


More Help





*