Tables : Lesson 1
Lets start with a simple table. Look at the output first and I shall explain the code.
Code for the above table is below. Please note down that I am giving only the code which is to produce table not the complete html page which include <html> and <body> tags. This table tag <table> is off-course within <body> tag.
Lets start with <table> tag. As every tag has starting and ending tag. border is set to "1". It can be "0" or higher number. With "0" you won't see border lines. Higher numbers will produce thick border.
<caption> is like a title of the table.
<tr> is for each row and for each row <td> will put column(s) on that row. In next lesson you will learn that number of columns can be different in rows. But this example shows same number of columns for each row.
<th> is for the heading. It just bolds the text by default.
<td> is the data for each row.
It wasn't that difficult. Was it?
Same table with border="0"
... with border="5"
Have you noticed that border number changes the outside border of the table only. Inner rows and column border doesn't change but remain same.