HTML Reference Guide


Tag Index | Content List | HTML FAQ


How do I make a table?

Tables come in very handy when laying out the page so that the viewer sees it exactly as the designer intended. Tables start out with the <TABLE> tag but the attributes are really what make the table happen.

You use the border attribute to specify a visible border width for a table. A border of 1 pixel width is the default if you do not specify the width. Use BORDER=0 if you do not want to show a border.

And the cellspacing attribute specifies a pixel width for spacing between cells, visible if a border is larger than 1.

The cellpadding attribute specifies a pixel width/value for spacing from the cell border and the content of the cell.

The width attribute gives pixel dimensions or percentage for the width of the entire table.

Example code:

<TABLE>
<CAPTION>Teachers Name List</CAPTION>
<TR>
<TH>Name</TH>
</TR>
<TR>
<TD>John Smith</TD>
<TD>Middle School</TD>
</TR>
<TR>
<TD>Susan Planter</TD>
<TD>Southern High</TD>
</TR>
</TABLE>

Result:

Teachers Name List
Name  
John Smith Middle School
Susan Planter Southern High


  Free Web Pages | Super Links | Members Directory | Search | Privacy Statement | Site Map | Contact Us
Services: Create Free Web Page | Free Home Page | Free Web Page Builder
Free Web Page Templates | Free Web Sites | Free Web Space
Copyright © 1996 - 2006 WebSpawner.com. All rights reserved.