Why use a table??
In my opinion, a table is one of the most important tags in html.
It gives you great control over the layout of your page. It will
allow you to break up your page into sections, use white space,
use columns and rows, and much more.
A table was first created for the use of charts on html pages.
It allowed people to place figures on a web page in chart form so
they wouldn't be distorted. It didn't take long for web designers
to learn that tables was there key to creating the layout they desired.
To imagine a table, take a piece of paper, pretend that is your
page, and draw tic-tac-toe squares. This could be done on a web
page using the table tag. Lets create a table and see what the result
would be.
<table border=1 width=100>
<tr>
<td></td><td></td><td></td>
</tr>
<tr>
<td></td><td></td><td></td>
</tr>
<tr>
<td></td><td></td><td></td>
</tr>
</table>
The table you see above was created with the code directly above
it. Now lets learn what each tag does.
The <table> tag obviously starts the table. It also has and
ending tag that is required.
The <tr> tag is a table row. You use this tag every time
you want to start a new row within your table. You also must use
and ending tag with <tr>.
The <td> tag means table data. This tag will give you a new
cell each time you use it. Don't forget to end the <td>, it
is required also.
Now that we know how to create a table, lets go see what we can
do with it to make it suit our needs.
Now lets go to Step
2
|