Tables (Part 2)

 

Cellspacing and Cellpadding

  • CELLSPACING (all one word) gives the amount of space between cells. Many times, you won’t need to use this attribute, but it comes in handy sometimes.
  • CELLPADDING (all one word) gives the amount of space (or padding) between the cell border and the cell contents. I use this attribute frequently. This can really help your tables look nice.
  •  Activating Cells For Links

    CBS Home Page NBC Home Page
    ABC Home Page FOX Home Page

    Here is the code:

    <TABLE ALIGN=”center” BORDER=”20” CELLSPACING=”20” CELLPADDING=”20”>
    <TR>
    <TD ALIGN = “center”>
    <A HREF="http://www.cbs.com">CBS Home Page</A>
    </TD>
    <TD ALIGN = “center”>
    <A HREF="http://www.nbc.com">NBC Home Page</A>
    </TD></TR>
    <TR>
    <TD ALIGN = “center”>
    <A HREF="http://abc.go.com">ABC Home Page</A>
    </TD>
    <TD ALIGN = “center”>
    <A HREF="http://www.fox.com">FOX Home Page</A>
    </TD></TR>
    </TABLE>

    By the way, you’ll notice that the BORDER, CELLSPACING, AND CELLPADDING commands are all set at 20 in the above table to give you an idea of how this would change the appearance of your table.

    Images In Cells

    Web Design Course

    Week 9: Tables (Part 2)
    And here is the code:

    <TABLE WIDTH="100%" BORDER="1">
    <TR>
    <TD ALIGN="left"><IMG SRC="images/computer.gif"></TD>
    <TD ALIGN="center"><FONT FACE="arial, helvetica" SIZE="-1"><B>Individualized Learning Program</B>
    </FONT><H2><FONT COLOR="#CC0000"><I>Web Design Course</I></H2></FONT><B>
    <FONT FACE="arial, helvetica" COLOR="#0000CC">Week 9: Tables (Part 2)</FONT></B></TD>
    <TD ALIGN="right"><IMG SRC="images/computer.gif"></TD>
    </TR>
    </TABLE>

     Using Tables as Layouts for Web Pages

    The page is actually a table containing three rows. The first row only contains one cell. That is where you see OWAC Outdoor Writers Association of California. The second row contains two cells. The first cell contains the Table of Contents for the site, and the second cell contains the slide show and the text underneath it. Then finally, the third row contains the rest of the page. Let me show you an example of how this table is set up:

    OWAC: Outdoor Writers Association of California
    Table of Contents Slide Show and Text
    Rest of the page

     

    Then, we can just change the border to BORDER=”0”, and we have a fantastic layout in which we can create the page.

    Page 6

    Lessons

    Web Design II

     

     
    Make a Free Website with Yola.