Make your own free website on Tripod.com

Back to Overview

Tables

This section is about tables. Tables are supported by most browsers, but it is a good idea to create an alternative for those browsers that do not. Also, some attributes are new and are not supported by many browsers. Anything can be placed inside a table cell.

  • The <TABLE> Tag
  • Table Rows:<TR>
  • Heading Cells<TH>
  • Data Cells<TD>
  • Table Captions<CAPTION>

  • The <TABLE> Tag

    This tag is used at the beginning of every table. It must be closed by typing </TABLE> at the end of the table. Attributes
    Sample Table
    Back to top


    Table Rows: <TR>

    This tag indicates the start of a row of cells. It must be closed by the </TR> tag at the end of the row. Attributes
    Sample Table
    Back to top


    Heading Cells: <TH>

    This is a type of cell tag. It indicates a heading cell, and any text inside it and its closing tag is formatted as such. This tag must be closed by typing </TH>. Attributes
    Sample Table
    Back to top


    Data Cells: <TD>

    This is the tag for a regular table cell. It must be closed by typing </TD>. Anything between this tag and its closing tag appears inside the cell. Attributes
    Sample Table
    Back to top


    Table Captions: <CAPTION>

    This tag tells the browser to display a caption for the table. The tag appears inside the <TABLE> tag and must be closed by typing </CAPTION>. Attributes
    Sample Table
    Back to top




    Back to top

    Sample Table

    This is a sample table:


    This table has a width of 700 pixels, a border of eight pixels, cellspacing of three pixels, and cellpadding of seven pixels. The FRAME attribute has been set to HSIDES

    This caption has been aligned to the bottom.
    This is a heading cell. This is a heading cell that spans three columns.
    This is a cell that spans three rows.

    (Normally, table cells are not so much larger than their content. I have tried to force them to be larger so that you can see the alignment of the text. That's what the dots are for.)
    This cell's contents
    have been aligned
    to the top left.
    This cell's contents
    have been aligned
    to the top center.
    This cell's contents
    have been aligned
    to the top right.








    .
    This cell's contents
    have been aligned
    to the center left.
    This cell's contents
    have been aligned
    to the center center.
    This cell's contents
    have been aligned
    to the center right.








    .
    This cell's contents
    have been aligned
    to the bottom left.
    This cell's contents
    have been aligned
    to the bottom center.
    This cell's contents
    have been aligned
    to the bottom right.








    .

    Back to top


    Fantasia
    Fantasia___@yahoo.com (That's Fantasia___@yahoo.com with three _'s. "_~)