Wednesday, April 25, 2012

How to create Html tables

The simple table Html tag is created using the tags <table> and </table>.To define the table content you use the <tr></tr> tags for the rows and <td></td> for columns.


























 Now you should get a simple table.


























By now it looks good, but lets add a border to the table to give it a little bit of life.
You can do this by giving the table definition the attribute "border='1'".The border size is all up to you, to define it just type the size you prefer instead of 1 (size in px).If wanting a blank, cell you should use a white space (&nbsp;).This is done, because some browsers don't recognize white spaces and always need some content.The following example has got a 1 px border and a blank cell.























No comments:

Post a Comment