Lesson 2
The <table> tag
The table tag is similar to a body tag. It determines the overall look of your table, so it is very important. The attributes of the table tag can be put in any order. We'll put each one on a separate line for the purposes of our discussion. Only use the ones you need.
<table
(Open your table)
align="??"
bgcolor="??"
background="URL_of_image"
transparency="??%"
border="??"
cellspacing="??"
cellpadding="??"
height="??"
width="??">
The rest of your table goes here
</table>
(Close your table)
You can align your table in your sig or on your page. Use:
align="left", align="center" or align="right". The default is "left".
Your table can have its own background color (bgcolor). Replace
?? with the color you want.
Your table can have its own background. Replace ?? with
the URL of an image.
You can make your table partly transparent, so your page background will "show through". Choose a percentage from 1-100.
Your table can have a border. Replace ?? with a number of pixels. The default is "1", but WebTV usually "sees" "0"
Cellspacing will put a border around each cell. Replace ?? with the number of pixels you want. The default is "1".
Cellpadding is the amount of space around your information inside each cell. Replace ?? with a number of pixels. We'll talk more about cellspacing & cellpadding real soon with some examples.
Your table can have a fixed height & width in pixels. This is useful for putting an image that is one size on top of a background with a larger size.
You can also enter width as a percentage.
We'll discuss these attributes indvidually in more detail in coming lessons. We'll also cover some more attributes, such as gradcolors, later.
In Lesson 3 we'll discuss the <tr> & <td> tags.
Your questions and comments are always welcome.
Now repeat after me:
I love tables!
Tables are my friend!
I am zee mighty cree-ay-tor!
Happy tabling! Gnubee
Homework Assignment
- Make a table & put an image in it
Feel free to play with the attributes
- Post your table
- Show your work
If you'd like to use a text box to show your code, here's one you can copy or transload.
Lesson 3 will be on the <tr> and <td> tags.
Table Course
Table Gallery
Key Concepts and Table Tips
Understanding Gradangles
WebTV Viewer
Table Gallery
HTML Cookbook
Html.Help.Gnubee
Html Help Gnubee Chat
|