Presentation is loading. Please wait.

Presentation is loading. Please wait.

HTML Tables Introduction to Tables Introduction to Tables Table Format Table Format Table Captions Table Captions Table Example Table Example Excercise.

Similar presentations


Presentation on theme: "HTML Tables Introduction to Tables Introduction to Tables Table Format Table Format Table Captions Table Captions Table Example Table Example Excercise."— Presentation transcript:

1 HTML Tables Introduction to Tables Introduction to Tables Table Format Table Format Table Captions Table Captions Table Example Table Example Excercise Excercise

2 Introduction to Tables Why Tables? Organized layout of informationOrganized layout of information Allows good organization of webpageAllows good organization of webpage Can be used to replace static framesCan be used to replace static frames

3 Table Format …

4 options options border = [0/1] cellpadding = [0..] cellspacing = [0..] width = [0..100%] / x (x is a pixel value)

5 Examples Year Sales 2000 $18M 2001 $25M 2002 $36M Year Sales 2000 $18M 2001 $25M 2002 $36M If you add the following :

6 Examples By contrast the cellspacing attribute sets the space between the cells. Setting the cell spacing to 10: has the effect:

7 Examples Table Width You can set the width of the table using the width attribute. The value is either the width in pixels or a percentage value representing the percentage of the space available between the left and right margins. For instance to set the width to 80% of the margins:

8 options (table row) options (table row) align = [left|center|right] valign = [top|middle|bottom]

9 Examples You can change alignment using the align attribute, which can be added to each cell or to the row (tr element). It is used with the values "left", "center" or "right": Year Sales 2000 $18M 2001 $25M 2002 $36M

10 options (table header) options (table header) rowspan = [0..] colspan = [0..] bgcolor = [rgb colour code|colour]

11 Examples Year Sales North South Total 2000 $10M $8M $18M 2001 $14M $11M $25M

12 Example

13 options (table data) options (table data) width = [0..100%] bgcolor = [rgb colour code|colour] align = [left|center|right] valign = [top|middle|bottom]

14 Example Year Sales 2000 $18M 2001 $25M 2002 $36M


Download ppt "HTML Tables Introduction to Tables Introduction to Tables Table Format Table Format Table Captions Table Captions Table Example Table Example Excercise."

Similar presentations


Ads by Google