<TABLE></TABLE>

Contains all the elements of a table


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


Element to contain the definition of a table.

   <html>
        <head>
        <title>Page with a table</title>
        </head>
        <body>
          .
          .
==>>      <table border=3 cellspacing=2 cellpadding=2 width="80%">
       <caption>Sample Table</caption>
        <tr><td>Cell One<td>Cell Two<td>Cell Three
        <tr><td>Cell 1 on row 2<td>Cell 2 on row 2<td>Cell 3 on row 2
==>>      </table>
         .
          .
        </body>
        </html>

The table element can be used for a lot of formatting of pages (of course you are strongly urged to NOT use it for this purpose). But, if you want to use it for showing data in a tabular format then read on.

HTML 3.2 Final

All the attributes on table are optional. The browsers will render it without borders and sized to fit the content. But if you want something more than defaults read on:

align
You can specify left, center or right. This will put the table on the left margin, centered between the margins or aligned to the right. You can override this attribute by enclosing the table in a div or center element.
width
If you leave this attribute off then the browser determines how wide to make the table from the contents. You can control the browser display by telling the browser to make it a certain number of pixels wide. Or you can make it size within the window size by giving a percentage of the window width.
border
You can specify that your table have a border by giving some number of pixels greater than 0. Browsers are supposed to leave the border off if you don't put this attribute at all.
cellspacing
Each cell in a table has it's own border. It's not like the tables in Word or Excel where the cells are butted together. This value tells the browser how many pixels to leave between the cell borders (or from the table border on the outside cells).
cellpadding
This attribute tells the browser how many pixels to leave between the cell borders and the inside contents.

Netscape

Nothing to add.

Microsoft Internet Explorer

Nothing to add.

Internationalization

Nothing special.


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


The Rusk Family . . . "the Legend Continues"

Michael T. Rusk
Comments to author: mrusk@radix.net

All contents copyright © 1996, 1997 Michael T. Rusk
All rights reserved.

Revised: December 03, 1997 10:35 -0500
URL: ./htmlgd/tagtable.html