Tables allow you to control the placement of text and images on your Web pages. The key to using tables is to plan the table before adding it to an HTML document. Storyboard the tables on paper before inserting them into your page.
Students will learn the basic tags involved in creating a table and how to apply them to a Web page.
A table consists of:
ROW Horizontal line(s) of data.
COLUMN: Vertical line(s) of data
Cells Area where ROWS and COLUMNS
intersect
The following commands are used for making a table:
<TABLE> Comes before the text.
</TABLE> Ends the table.
<TH> In front of the text you want as a header cell for your table.
</TH> After the text.
<TR> Comes before the text you want to appear in one row of the table.
</TR> Comes at the end of each row.
<TD> This comes in front of the text you want to display in a data cell.
</TD> After the text.
The following is an example using tables:
| Heading 1 | Heading 2 | Heading 3 |
|---|---|---|
| Cell 1 | Cell 2 | Cell 3 |
| Cell 4 | Cell 5 | Cell 6 |
<html>
<head>
<title>
</title>
</head>
<body>
<table>
<tr>
<th>Heading 1</th>
<th>Heading 2</th>
<th>Heading 3</th>
</tr>
<tr>
<td>Cell 1 </td>
<td>Cell 2</td>
<td>Cell 3</td>
</tr>
<tr>
<td>Cell 4</td>
<td>Cell 5</td>
<td>Cell 6</td>
</tr>
</table>
</body>
</html>
![]() |
|
|
|
![]() |
|
![]() |
|
||||
| |
|
||||