|
Learn Tables as Easy as 123
When I first started to learn html, I had difficulties when I try to put two images beside each other or even two documents that are not related to each other because I didn't know a lot about how to make tables. To begin with, I use tables in many different situations, infact I found out that it is almost imposible to make a nice page without knowing about tables.
How do we make a table
as you all know a table has many properties like the number of rows and columns It also has many other properties like the color of its background and the color of the table border, but some of these features are not shown by some browsers specially the old ones.
Let is translate these properties in to html:
- instead of saying table we will use the tag <table> </table>
- a row has the tag <tr> </tr>
- a column tag is <td> </td>
Let is make a table. first type the table tag as follows:
<table> </table>
Then we will have to add the row tag:
<table> <tr> </tr>
</table>
We know any table has atleast one column so we must specify.
<table> <tr> <td> </td></tr></table>
Now you can write in side the td tag. as follows.
<table> <tr> <td>
table
</td></tr></table>
but if you save and check how it looks like now you won't see anything except the word we wrote at the end. so we must specify the border inside the table tag as follows
<table border=3> <tr> <td>
table
</td></tr></table>
now it looks like this.
look at the different affects in the following examples:
<table border=25> <tr> <td>
table
</td></tr></table>
<table border=5> <tr> <td>
table
</td><td>
table
</td> </tr></table>
<table border=5> <tr> <td>
table
</td><td>
table
</td> </tr>
<tr> <td>
table
</td><td>
table
</td> </tr>
</table>
The above example with out the border discription will look something like this.
This is why you can use tables to put images beside each other.
Now my following table will explain some other properties that a table can have.
|
the name/tag
|
function |
where it goes |
| width=55 |
describes how wide |
either in the table,tr, td tags |
| height=7 |
how tall |
same as above |
| bordercolor="#fffff" |
the color of the border |
only in the table tag |
| bgcolor |
background color |
usually in the table and td tag |
That is the most important thing you need to know about tables. Tables can replace frames, infact many people like tables better than frames because some browsers may not show frames.
check here to continue
<--Home
|