Skip to Main Content or Page Contents
Lesson Introduction | |
Elements Required for a simple table | <TABLE> <TR> <TD> |
Table attributes | align background bgcolor border bordercolor bordercolordark bordercolorlight |
A Simple Table | Exercise 1. Very simple 1 Cell Table-
no border Exercise 2. Add a blank line, a table with a red border Exercise 3. Table width, pixels or % |
Multi Column and Row Table | Exercise 4. Multi Column and Row Exercise 5. Add a column Exercise 6. Add a row |
Tables were originally created for displaying tabular data and for this they are ideal. Web page designers also use them create Web page layout. In this lesson you will learn how to write the HTML code for a very useful HTML element - The table.
You will learn: How to
John McGuinn
A simple table example
Cell | ||
Another cell |
This table consists of
Top. |
Values The default value in bold | Examples | End Tag | comment | |
align | left, center, right | <TABLE align="center"> <TD " align="center">Cell contents</TD> |
Req. | deprecated |
background | a URL | <TABLE background="an-image.gif"> The URL above is only a file name, indicating that the file is in the same directory as the web page. |
Req. | An image file that can be used as a background for the table. Best results are achieved with a non animated and having very subtle colours. NN n/a |
bgcolor | A color name, or # and an hexadecimal value | <TABLE bgcolor="red"> <TABLE bgcolor="#FF0000"> <TR bgcolor="blue"> <TD bgcolor="green"> |
Req. | The fill colour for the entire table, using TABLE |
border | a number | <TABLE border="0"> align background bgcolor border bordercolor bordercolordark |
Req. | The value determines the border
thickness in pixels. 0 The border is not visible. |
bordercolor | A color name, or # and an hexadecimal value | <TABLE bordercolor="white"> <TABLE bordercolor="#FFFF00"> |
Req. | The default value varies. |
bordercolordark bordercolorlight |
As above | Req. | The default value varies. NN n/a |
|
bordercolor, bordercolordark,
bordercolorlight do not validate at W3C with as HTML 4.0 or 4.01. |
Top. |
MUCH MORE TO FOLLOW SHORTLY, including more complex tables
This site is hosted on Hostgator