ADDING TABLES

Tables can be used in many ways. They can be used to present information and data or to neatly layout part of, or a whole webpage, serving as a template for an entire website. Laying out your webpage using tables will be stressful when changing the entire layout of your website.

   
 We will only use tables to present data and information, and to neatly organize our photographs for a photo album. We will also change how our tables will look.


    
 It is important to know the basic format used to create a table, yet there must be text in the TR and TD tags for a table to completely appear. Tables have a default size, and overlapping text will be wrapped to the next line.


<table>
<tr><td>Put text/such here</td></tr>
</table>

     The TR tag will create a table row, while the TD stands for table data, and will create a table cell. As you'll learn, you may place infinitan e number of TD tags in a single TR tag. The table below is a plain address book, and below it is the address book but with color and borders. Notice that <tr><td></td></tr> left blank stands as a parapgraph break for tables. Never include any breaks in a table in replace of a table row.
     Here's the code for the finished address book, with color and all:
    

 And here's the overall finished effect, with the CAPTION tag (which places a caption (table's name) above the table's data, and it can't be given a background color):

egbaba's Address Book
Friend's NameFriend's AddressFriend's Phone NumberFriend's Website
egbabaSTREET
CITY, STATE ZIP
000-000http://www.egbaba.in
Anywho AnyoneAny Address
Any City, Any State Any Zip Code
000-000http://www.egbaba.in
     

Next we will make a photo album using some of our photos. I am going to include four photos, of myself and my cat. Note that the size of the photo will stretch the cell it is placed in if it is too big.
     Here's the code:
Kelcey's Photo Album

Share this

Related Posts

Previous
Next Post »