Coolwebcountry - Your journy for web design starts here!
HTML Chapter-4.....Table GenerationSome times you will be requiring to show your data in tabular format. For that you will require table generation tags. Later you will also learn that these tables also helps in making building blocks of your website design. By manupulating these tags, you can give completely different look to your website. Basic table contains table tags, inside which there will be table row tag and table data tag.
A typical two rows and two column table will have code tags as below.
<TABLE> <TR> <TD></TD> <TD></TD> </TR> <TR> <TD></TD> <TD></TD> </TR> </TABLE>
Obviously you will be putting your text between <TD> and </TD> tags.
Only making table without formatting will not do that good. Hence some tweeking is required with table tag. You can specify with of the table across your web page. It can be set in percentage or pixel format. Code for this is as below.
<TABLE width="70%">
Apart from this you can also set table border, border color,cell padding and cell spacing also. Typical code for this will be as below. Put this in your table code, change the values and see the difference.
<table BORDER="1" CELLSPACING=0 CELLPADDING=8 WIDTH="100%" >