| the complete webmaster | ||||
| tutorials | reviews | reference | ||
|
The Complete Guide to Tables - part 2In the last article we discussed some of the more basic functions of tables. In this article we will build on those skills and try to show the importance of using tables in your HTML documents. Tables can be very important in presentations. You can use tables to position data in graphs and lists. Besides being functional tables can also improve the looks of entire presentations, But before we try to make some graphs we need to learn a few more of the options we can use when making a table: the <TH></TH> tag. We will learn the cellspacing, cell padding and border options. We will also learn about backgrounds in tables and table cells. The <TH></TH> tags are like the <TD></TD> tags we learned last week in that they are used to display data that are entered in them, but the <TH></TH> tags are used for table headings. Allow me to demonstrate :
would create this table:
Cell spacing and paddingCell spacing and cell padding can be used to separate cells on your tables. These options are handy if your tables data seems to clumped together. To use the cellspacing and cellpadding options simple insert them into your table tag like this.
This would add a 5 pixel space between your table cells.
Table BordersTable borders are an easy way to make your tables stand out on your pages. This option add a border of a specified width (pixel) on all sides of your table. To use the border option just insert it into your table tag and give it a pixel value just as we with the cellpadding and cellspacing options.
Colored CellsTables and their individual cells can be colored using the bgcolor option just like the one you may use in your body tag. You can use this option in the <TABLE> and <TD> tags. The <TABLE> color will fill all cells without their own bgcolor option to its color. Background colors in tables are specified with the same Hexecidecimal codes used to specify the color of your <BODY> background (with the exception of 16 predefined colors i.e. red, green, blue, ect...). Now that we have learned these new options for tables Lets Make a Bar graph that uses everything we know.
Absolute Spacing with TablesAbsolute pixel spacing with tables allows you to get your pages to look the same for any resolution. This can be easily accomplished by using tables to control the entire layout of your HTML pages. Next weeks article will demonstrate this with some working examples for you to look at.
Author: Rich Stock
More articles about HTML |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| write for us | about us | advertise |
Copyright 1997, 1998 A Big Lime. All rights reserved.