session -8-TABLES

Tables are used extensively on many web sites to bring structure to a page. There are small tables and big tables- small ones are often used simply to encompass and organize a section of the page, such as a chart or spreadsheet data; large ones are used to bring organization to the entire document. An HTML table may look something like the this.

This is a table

How to create a table

The basic tags necessary to create one are:

Tag

Function

<table></table>

Defines a table

<tr></tr>

Defines a row within the table

<td></td>

Defines a cell within the table

Every table you construct will consist of the above three tags.

The syntax of the most basic form of table, with only one row and cell is:

<table><tr><td>Some text in the cell</td></tr></table>

Some text in the cell

We use 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 example), or otherwise, go into the <td> tag.

Let's create a table with one row, but two cells inside of it:

<table><tr><td>Cell #1</td><td>Cell #2</td></tr></table>

Cell #1

Cell #2

INDEX

NEXT PAGE

Music 
News
Health
 History
  Sports
Archaeology
Geography
 College Courses