iPage Hosting $95 Plan on
sale today for
$1.89/mo
Click Here for More Details!
Example of a Table...
| What are tables used for? |
|---|
| Tables are used to make data easier to interpret or to just give your document more impact. |
<table border="4"> <tr> <th>What are tables used for?</th> </tr> <tr> <td>Tables are used to make data easier to interpret or to just give your document more impact.</td> </tr> </table>
Tables are one of the most challenging things to code with HTML. It isn't very hard, it just takes a while to get the hang of. Tables start with the <table> tag, and usually contain the border="n" attribute within the opening tag. If the border="0", than the table's border is invisible. Usually when you do not use the border attribute the table border will become invisible. This is useful when you want to align text in rows and columns, but don't want a table border around it. border="1" is a thin border. border="2" is a little thicker, border="3" a little more thick.. and so on. The table MUST end with a </table> tag, or the table might not appear at all!
Example of tables with borders...
<table border="0"> <tr> <td>This table has a |
<table border="3"> <tr> <td>This table has a |
| Heading A | Heading B | Heading C |
|---|---|---|
| Cell A | Cell B | Cell C |
| Cell D | Cell E | Cell F |
<table border="2"> <tr> <th>Heading A</th><th>Heading B</th><th>Heading C</th> </tr> <tr> <td>Cell A</td><td>Cell B</td><td>Cell C</td> </tr> <tr> <td>Cell D</td><td>Cell E</td><td>Cell F</td> </tr> </table>
| Heading A | Heading B | Heading C |
|---|---|---|
| Cell A & D | Cell B | Cell C |
| Cell E | Cell F |
<table border="2"> <tr> <th>Heading A</th><th>Heading B</th><th>Heading C</th> </tr> <tr> <td rowspan="2">Cell A & D</td><td>Cell B</td><td>Cell C</td> </tr> <tr> <td>Cell E</td><td>Cell F</td> </tr> </table>
| Left Alignment | Center Alignment | Right Alignment |
<table border="1" width="100%"> <tr> <td align="left">Left Alignment</td> <td align="center">Center Alignment</td> <td align="right">Right Alignment</td> </tr> </table>
In the Box below, type the following HTML code, then click "Check it Out!" The HTML document you made will be displayed in your browser. You may wish to change the words within the tags and the tag attributes just to try it out.
Try typing this:
<html>
<head><title>Title goes here</title></head>
<body bgcolor="#AABBCC">
<h1 align=right>Body goes here</h1>
<hr>
<center><h3>Headings are cool!</h3></center>
<hr size=10>
<table border="2" width="75%">
<tr>
<td>Tables</td><td>give</td><td>impact!</td>
</tr>
</table>
</body>
</html>