Thursday, 2 February 2012

HTML Table Tags

HTML Table Tags Web Design Page Layout For Beginners

Now you know how to put together the basic tags, it's time to start learning about layouts within those tags and the most basic of which is the <table> TAG </table>

Now table tags unlike most others contain several elements
<table> The opening of the initial tag
<tr> The Return putting all you do on the next level of the table
<td> Where your text or pictures would reside

As with all the other tags we have looked at, each of these opening tags, needs a corresponding closing tag.  So the basic table layout would look like

<table>
<tr>
<td>
Some Content May Go Here
</td>
</tr>
</table>

Now once again, as we showed with the <p> Tag, this will just put you basic text on your web page.  But as with the <p> Tag, we can change the layout of this by using attributes.  For Example

<table align="center"> will put the whole table on the ceneter of the page.

To restrict the width of everything that goes in that table you could use

<table width="100%"> or <table width="200px"> which will determind the size of that table.

You can also do the same with one of the internal table elements, the <td> Tag For example

<table align="center" width="200px">
<tr>
<td align="right">
Then put some text here and close the table tags as below
</td>
</tr>
</table>

This example will put the table in the middle of the page but align all the text you put between the tags to the right so your page would end up looking like:


Content By Web Connections - Web Design - Software Design

No comments:

Post a Comment