Lesson 4

the <th> tag

<th> stands for "table header". It has to be closed (</th>) just like the other table tags.

It would typically be used in the first row or first column of a table. What it does is center your text & make it bold.

In other words,
<th> Text </th>
is the same as
<td align="center"><b> Text </b></td>

The advantage of using <th> is that you get to save 23 keystrokes (& 23 bytes of file size) each time you use it.

Table Tip

Large tables can have a lot of code, but you can still build them very quickly if you copy and paste wherever possible.

For example, make one cell with all the attributes you want (align, valign, bgcolor, background, etc.), then just copy and paste to make your other cells. Go back and adjust your attributes as needed.


Sample table:

I love tables!
Tables are my friend!
I am ze Mighty Creator!




Code


Homework Assignment

  • Read the Key Concepts(link below)
  • Make a 3x3 table (3 rows and 3 columns, total 9 cells)
  • Use <th>'s instead of <td>'s in either the first row or the first column
  • Put any text you want in the 9 cells
  • Post your table and show your code

You may want to save this table for the future.
Have I mentioned those Key Concepts?

Lesson 5 wil be on Cellspacing and Cellpadding.



Table Course
Table Gallery Key Concepts and Table Tips
Understanding Gradangles
WebTV Viewer
Table Gallery
HTML Cookbook
Html.Help.Gnubee
Html Help Gnubee Chat