Creating tables in HTML

Table headings

Table headings, make any item in the table align in the center of it's box and make it bold, saving a lot of HTML tags. Table headings, or <TH>, simplt replace the <TD> tags in the code for any item.

<TH> ITEM 1 </TH>
<TD> ITEM 2 </TD>
<TD> ITEM 3 </TD>
<TH> ITEM 4 </TH>

Item 1 Item 2
Item 3 Item 4

This technique is really simple but if used correctly can be really good. The effect stands out more if the table is wider, which I will cover next.

You might also like...




Our tools

