Denise's Virtual Notebook

(Lesson 4)

Home Page
Lesson 1
Lesson 2
Lesson 3

In our fourth lesson we are learning how to create tables.  This looks like it will be an exciting and very useful lesson.  I'm anxious to get started!


Creating Tables

This is an example of a very simple table.

Math English
Science History


Using the same data I created a table with a border.  It looks much better than the first table.

Math English
Science History


Now I'm centering my table and adding other tags and attributes, such as summary, caption and table header.

My Family
Name Age Gender Relationship
George 56 M Husband
Amy 34 F Daughter
Brett 31 M Son



Using my original table I will now add the colspan attribute to create a heading that spans more than one column.  In this case the heading is "Important Classes" with a colspan of 2.  Notice that the heading stretches across the table.

Important Classes
Math English
Science History


I can also opt to use the rowspan attribute that creates a heading that covers more than one row, stretching down the table instead.

Important Classes
Math English
Science History


I may decide that my table needs more space.  For this I can use cellspacing (to make the space between the cells larger).

Important Classes
Math English
Science History


. . . or cellpadding (to make the space between the items in the cells and the cell walls larger).

Important Classes
Math English
Science History


In the following table I have tried to use most of the attributes we've discussed for tables thus far:

Important Classes
Taught in School
Math English
Science History



Now let's add some color.

My Family
Name Age Gender Relationship
George 56 M Husband
Amy 34 F Daughter
Brett 31 M Son

Important Classes
Math English
Science History




Some Not-Very-Often-Used Special Tags


<pre></pre>
One tag that is not used too often is called a preformatted tag.  In this tag, text will appear on the page as it appeared in the original document.  This would be especially good for a poem.  You can change the style and size of the font.  For this example I have chosen to use the piece of poetry that was included with the lesson in hopes that there are no copyright issues.

       I daydreamed night dreams
      and they all seemed so real.
    then I fantasized fantasies and
      realized they were reality!



<big></big> and <small></small>
These two tags are used to make the text between the tags either "bigger" or "smaller" than the rest of text.  You would probably use the font attributes more often but this is another option.


Explore Virtual University

Home Page

Hosted by www.Geocities.ws

1