News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

HTML Table

Started by VelMurugan, Apr 30, 2009, 03:35 PM

Previous topic - Next topic

VelMurugan

HTML Table

This section lists the tags often used with HTML tables: <table>, <tr>, and <td>.

<table>


The <table> tag specifies the presence of a table. This is very often used in conjunction with the <tr> and the <td> tags. The following attributes are commonly used to define the properties of this table:

    * width: This specifies the width of the table. Can be specified in pixels or in relative terms (for example, 100%).

    * border: This specifies whether the table will have a border. The number indicates the thickness of the border.

    * cellspacing: The amount spacing between the cell wall and the cell border. The area enclosed by the cell walls are the maximum amount of area that text can be displayed in a cell.

    * cellpadding: The amount padding between cells and the each cell wall in a table.

    * bgcolor: This specifies the background color for this table. The color value may be specified as the color name or the six-character color code.

<tr>

The <tr> tag specifies the presence of a row. The following attributes are commonly used to define the properties of this row:

    * bgcolor: This specifies the background color for this row. The color value may be specified as the color name or the six-character color code.

    * height: This specifies the height of the row.

    * rowspan: This specifies the number of rows this particular row occupies.

<td>
The <tr> tag specifies the presence of a column. Columns are specified within each row. The following attributes are commonly used to define the properties of this column:

    * valign:

    * width: This specifies the width of the column. Can be specified in pixels or in relative terms (for example, 50%).

    * bgcolor: This specifies the background color for this column. The color value may be specified as the color name or the six-character color code.

    * colspan: This specifies the number of columns this particular column occupies.

Example 1


HTML:

<table border=1>
<tr><td>Element 1</td><td>Element 2</td><td>Element 3</td></tr>
<tr><td>Element 4</td><td>Element 5</td><td>Element 6</td></tr>
</table>

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview