|
LESSON
5 |
|
Well I said we would learn Tables next so here it is... This lesson will deal with the basic's of tables and how to arrange text and images using tables! TAGSThese are the basic tags used in tables:
Below is an example of the Table ( <table> , </table> ) tags. (highlighted in blue)
Here is a couple of examples of the TABLE ROW ( <tr> , </tr> ) tags. (highlighted in blue)
Here is a couple of examples of the TABLE COLUMN ( <tc> , </tc> ) tags. (highlighted in blue)
Here Are Some examples of the TABLE DATA ( <td> , </td> ) tags. (highlighted in blue)
I added borders and Highlighted them to show you how tables look to the computer. Below is an example of the same table with out borders.
Here is the script for the table below. We will be using it for the rest of the lesson!
By now the script should be self explanatory.
TABLE tags
Inside the table start tag we see:
width="100%" border="10"
.
Of course you can use your own colors! By now your saying "Hold it! How come the table above doesn't use the whole width of the page?" Well lets see if I can explain it... I'm using tables to position everything on this page and one of the tables has one table row with two table data cells in it! The resource column on the left is one data cell and this text on the right is another, so the width of the table is 100% of the width of this data cell, not the whole page! Now your asking "How did you get the data cells to be two different sizes?" Well,Read on... DATA tags
If we look at the Data start tags we see:
align=left
,
align=center
,
align=right
and a tag with just the
td
in it. Yep you guessed it the
align=
means to position everything in the data cell either left,center or right
inside the cell. If there is no
align
command then it will align to the left!
I did not add that command to the last two <td> tags. Notice how the bottom two data cells fell inline with the top two! I did add this: bordercolor="ffb903" to the last two <td> tags! Now on to the last two tags... TABLE ROW and TABLE COLUMN tags There is really not much to say about these tags,I haven't been able to do anything with the <tr> tag, but you can add the width="" command to the <tc> tag, but I find that just using the <tr> tag is easier for me so I dont use the <tc> tag at all! If you do use the <tc> tag, remember that the data cells are read top to bottom and not left to right as with the <tr> tag! Using TABLES with IMAGES
The examples below show a few ways to show images with the tables used on this
page. All I did was insert
image
tags were the words "text" are!
I hope this lesson has been helpful,just remember these are by no means all of
the tags you can use nor is this a complete list of things you can do with
them! I hope in the future to cover more advanced HTML, for now please refer to
the resources on the left side of this page!
|
| text | text |
| text | text |