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 |
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 |
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:
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. |