top left
The HTML Source Logo


 html
Top Right
    
 Getting StartedHow Do I...TroubleShootingPromotionContact Us
 html
HTML
SEARCH THE SITE
advanced search



CATEGORIES
Home
Getting Started
HTML Cheat Sheet
Webmaster Tools
HTML Help Forum
Color Codes
Link to us









































bottom
HTML HTML HTML HTML
How Do I Create A Table?


Tables, what would we do with out em'. Tables can be a webmaster's best friend, they allow you to neatly align and display information on your web page.

How to do it

To create a basic table, do the following:

First, type out the data you want to appear in the first row of your table, Like so: (In this example well be using football stats)

Team
Games
Wins
Losses

Next, place the data that you want to appear in the second row, third row, and so on...

Eagles
5
5
0

Jets
5
4
1

Little Giants
4
2
2

Next, place a <TABLE> before the data you entered for your table.

Then, place a </TABLE> after the data you entered for your table.
Your code should look something like this:

<TABLE>
Team
Games
Wins
Losses


Eagles
5
5
0

Jets
5
4
1

Little Giants
4
2
2
</TABLE>

Next, place a <TR> tag before the text for each row in your table.

Then, place an ending </TR> tag after the text for each row in your table, looks like this:

<TABLE>
<TR>
Team
Games
Wins
Losses
</TR>
<TR>
Eagles
5
5
0
</TR>
<TR>
Jets
5
4
1
</TR>
<TR>
Little Giants
4
2
2
</TR>
</TABLE>


Next, place a <TH> in front of the text for each header cell.
Then, place a </TH> after the text for each header cell. The code looks like this:

<TABLE>
<TR>
<TH>Team</TH>
<TH>Games</TH>
<TH>Wins</TH>
<TH>Losses</TH>
</TR>
<TR>
Eagles
5
5
0
</TR>
<TR>
Jets
5
4
1
</TR>
<TR>
Little Giants
4
2
2
</TR>
</TABLE>


Then place a <TD> tag in front of each data cell.
Finally place a </TD> tag at the end of each data cell. Your complete code looks like this:

<TABLE>
<TR>
<TH>Team</TH>
<TH>Games</TH>
<TH>Wins</TH>
<TH>Losses</TH>
</TR>
<TR>
<TD>Eagles</TD>
<TD>5</TD>
<TD>5</TD>
<TD>0</TD>
</TR>
<TR>
<TD>Jets</TD>
<TD>5</TD>
<TD>4</TD>
<TD>1</TD>
</TR>
<TR>
<TD>Little Giant</TD>
<TD>4</TD>
<TD>2</TD>
<TD>2</TD>
</TR>
</TABLE>


Seeing this table in your browser will look like this:

Team Games Wins Losses
Eagles 5 5 0
Jets 5 4 1
Little Giant 4 2 2



< BACK







Company   |   Careers   |   Partners   |   Advertising   |   Help
Privacy Policy   |   Trademark Notices   |   User Agreement
2001 TheHTMlSource.com, INC. All Rights Reserved.



Site hosted by Angelfire.com: Build your free website today!