HTML Tables, HTML Tutorial, Global Guideline

Forum | Blog


Basic HTML Guide.      
 HTML Introduction.      
 HTML Entities.             
 HTML Tags Guide.      
 HTML Head.                
 HTML Meta.                
 HTML Styles.               
 HTML Formatting.       
 HTML Backgrounds.     
 HTML Attributes.         
 HTML Links.                
 HTML Tables.
 HTML Images.            
 HTML Colors.              
 HTML Fonts.               
 HTML Marquee.         
 HTML Forms.             
 HTML Frames.           
 HTML Lists.                
 HTML Scripts.           
 HTML Summary.        

HTML Tutorial >> HTML Tables.

     Back             Next     

This HTML Tutorial will guide you about HTML tables, HTML Tables are a lot easier to create than their wooden counterpart. Tables are used extensively on many web sites to bring structure to a page. There are small html tables and big tables- small ones are often used simply to encompass and organize a section of the page, such as a html chart or spreadsheet like data; large ones html tables are used to bring organization to the entire document as seen in the FrontPage of Global Guide Line. An HTML table may look something like the below:
This is a simple small HTML Table

How to create HTML Table

Explanations with each Table tag.
HTML Table Tag HTML Table Explanation
<table> </table> This tag defines a html table.
<th> </th> Heading of html Table this tag is nested in html table tag..
<tr> </tr> HTML Table row defines with in the html table tag
<td> </td> td tag is defined in tr tag and it defines a Cell in a HTML Table

Now we began our journey with the html <table> tag. Continuing on, we used the <tr> tag to define a row, and used one <td> tag inside to specify that this row should contain only one cell. All content, such as text in the above html table example, or otherwise, go into the <td> tag, and only the <td> tag. If you're a little confused at this stage, its ok. Practice makes perfect. lets create a table now with one row, but two cells inside of it:

    <td>HTML Table Cell #1</td>
    <td>HTML Table Cell #2</td>

To continue on with this html table madness, lets now create a table with two rows, each with two cells in them 4 html table cells in total. Take note of how the <tr> and <td> tags are positioned:

    <td>HTML Table Cell #1</td>
    <td>HTML Table Cell #2</td>
    <td>HTML Table Cell #3</td>
    <td>HTML Table Cell #4</td>

HTML Table Attributes

HTML Tutorial explanation of HTML Tables, like many other tags in HTML, accepts various attributes that control how a table is to look. Lets list some of the basic table attributes:
HTML Table Attributes HTML Table Tag Explanation
border=? Defines the border of the table 0-1 or any number.
width=? Defines the width of the table it would be also a number or in 0 to 100 in percents. eg 100%
height=? Height of the table defined with this attribute normally we don't use this attribute.
cellspacing=? Defines the spacing in between the cells of a table.
cellpadding=? Defines the spacing in a cell of table from its content.
bgcolor=? or background=? bgcolor is use for defining of back color of table and background will use for the image to display on back ground of table.  background gets the URL of an existing image.  And bgcolor gets the colors name or value as defined in HTML Tutorial color section.
bordercolor=? Defines the color of border of table.

     Back             Next     

[ About ] [ Contact ] [ Home ]
[ Links ] [ Site Map ] [ Services ] [ Privacy ]

Copyright 2005 -  2021 All rights reserved. (Best viewed in IE 6.0+ or Firefox 2.0+ at 1024 * 768 or higher) 347 visitors are online now