Tables are pretty simple:
<table> start the table
<tr> start a row
<td> start a column
</td> end a column
</tr> end a row
</table> end the table
/ in front of the <tr> row code </tr> ends the row
/ in front of the <td> column code </td> ends the column
/ in front of the <table> code </table> ends the table
<tr> </tr> is a row
<td> </td> is a column (repeat this code for each column)
A row with one column: <tr><td>1</td></tr>
A row with 2 columns: <tr><td>1</td><td>2</td></tr>
A row with 3 columns: <tr><td>1</td><td>2</td><td>3</td></tr>
The table below has:
row 1 Title Of Page
row 2 Heading
row 3 Content
row 4 Footer
But there is only one <td> </td> code per row,
which makes it a One Column Table.
Below I have used TH for the headings instead of TD, they both work.
The difference is TH tells the browser it is a Heading.
The text in < th > elements are bold and centered by default.
The text in < td > elements are regular and left-aligned by default.
Title of Page | ||
Heading | ||
---|---|---|
Content Here | ||
Footer Here |
No comments:
Post a Comment
Leave A Comment