Login    New User    Forgot Password    Help      

Polishing Your Table

GO TO INDEX

Polishing your table

To give your table a more polished look, you can include commands that will adjust the size of your table, add space in the cell, add space between rows, and align the data in a cell. Working with these commands is basically a process of trial and error to create the most appealing presentation of your information. The type of table that you create and the overall design of your web site will help you determine what works best for your table. 

Some of the commands that enable you to customize your table include:

  • The WIDTH=n% command sets the width of your table as a percentage of the screen.  The letter n designates the percentage that you assign to this command.  For example, if you want the width of your table to be one half the width of the screen, you would include theWIDTH="50%" command in the beginning table command. 
  • The CELLPADDING=n command adjusts the vertical dimension of the cells.  The lettern designates the numerical value that you assign to this command.
  • The CELLSPACING=n command sets the space or border around the cells.  The lettern designates the numerical value that you assign to this command.
  • The ALIGN=(LEFT, RIGHT, or CENTER) command will horizontally align the data in a cell.  For example, if you wish to place the data in the center of each cell in a row, you would include the ALIGN=CENTER command within the row command. 
  • The VALIGN=(TOP, MIDDLE, or BOTTOM) command will vertically align the data in a cell.  For example, if you wish to place the data in the center of each cell in a row, you would include the ALIGN=MIDDLE command within the row command. 

In addition to the codes that were explained in the previous sections, the table below now includes some of these commands.


TABLE TITLE

Column A Column B
Data 1 Data 2

The following codes, along with codes previously discussed, created this table:

    <TABLE BORDER="5"    WIDTH="50%"   CELLPADDING="4" CELLSPACING="3">
       <TR>
          <TH COLSPAN="2"><BR><H3>
    TABLE TITLE</H3>
          </TH>
       </TR>
       <TR>
          <TH>
    Column A</TH>
          <TH>
    Column B</TH>
       </TR>
       <TR ALIGN="CENTER">
          <TD>
    Data 1</TD>
          <TD>
    Data 2</TD>
       </TR>
    </TABLE>

Notice that the TABLE command now includes the WIDTH="50%" command. This command extends the table across one half of the width of the text. Also, the CELLPADDING="4" command increases the vertical dimension of the cells, and the CELLSPACING="3" command increases the border around the cells. Finally, the ALIGN="CENTER" command places Data 1 and Data 2 in the center of the cell.




















GO TO INDEX