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.

<TABLE BORDER>
<TR>
<TH> ITEM 1 </TH>
<TD> ITEM 2 </TD>
</TR>
<TR>
<TD> ITEM 3 </TD>
<TH> ITEM 4 </TH>
</TR>
<TABLE>

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...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“XML is like violence - if it's not working for you, you're not using enough of it.”