Learning Html
This is the table section.

This section concerns how to create tables as well as how to use them.

The main creation of a table is handled by this tag: <table BORDER=0 CELLSPACING=1 COLS=1 WIDTH="50%" BGCOLOR="ffffff" ALIGN="center">
To change the size of the border, change the value after border.
To change the distance between cells, change the value after cellspacing.
To change the number of columns, change the value after cols.
To change the width of the table, change the value after width.
To change the background color, change the value after bgcolor.
To change the alignment of the table, change the value after align: left, center, right.

The <tr> tag starts a new row.
The </tr> tag ends a row.
The <td> tag starts a new column.
The </td> tag ends a column.

This tag <td colspan=3> will make a column merge with the number of column listed in the value.
This tag <td valign=center> will align the contents of that cell: top, center, bottom.
This tag <td align=left> will align the contents of that cell: left, center, right.

The <table> tag closes/ends the table.

So, to create a simple table:
<table BORDER=2 CELLSPACING=1 COLS=2 WIDTH="50%" ALIGN="center">
<tr><td>Text goes here
</td>
<td BGCOLOR="green" align="right">Text goes here
</td></tr>
<tr><td colspan=2 align="center">Text goes here
</td>
<table>

This would produce a table that looked like this:

Text goes here Text goes here
Text goes here


To go back to the how-to: HTML How-To
To go to the <html> section: <html>
To go to the <head>section: <head>
To go to the <body>section: <body>
To go to the <font> section: <font>
To go to the <links> section: <links>

This site and all the contents
(unless otherwise specified)

© Eric W. Huff 1999-2015

All Rights Reserved