Tables
Tables are flexible and can be used for many different purposes:
- Structuring information (technical data etc.)
- Page layout, the way your page looks in the browser (Individual cell
can contain HTML elements).
Table structure
A table consists of rows and columns:
- <tr> (table row) tag indicates the start of new row.
- <td> (table data) tag starts a new cell within a row.
<html>
<head>
<title>Table</title>
</head>
<body>
<table width="650" border="1"
cellspacing="4" cellpadding="10">
<tr>
<td>table</td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
Click here to see
the result

Table Attribute:
Cellpadding: Defines the amount of space in pixels or percentage
between all four edges of a cell and its contents.
Cellspacing: Defines the amount of space in pixels or percentage
between the cells.
Width: Sets the width of the table in pixles or percentage. For
example: width="600" or width="100%"
Border: Puts a border around the table and all the individual cells.
For example: Border="0" makes the border (table) invisible.
Bgcolor: Defines a background color for the table or individual
cells. For example: [color name (bgcolor="yellow") or hexadecimal
value (bgcolor=#000000)]
It can be placed in the <tr bgcolor="#000000"> or <td
bgcolor="#000000"> or the <table bgcolor="#000000">
Align: Defines the alignment of the table relative to the page.
For example: align="right" puts everything to right side. or
align="center" puts everything to the center, align="left"
is the default value.
Bordercolor: Defines the color of the border and cells. Netscape
and IE have different interpretation.
Valign: Defines the vertical alignment of the content within the
cell. ie: valign="top", valign="middle" is the default
value, valign="bottom", valign="baseline"
More about tables >>>>
[1]---[2]
Copyright © 2001 koodesign
|