| Creating a simple table | Nesting tables | Adding a table border | Setting the table width | Table alignment | Aligning a cell's contents | Changing the background | Controlling spacing | Spanning a cell.
Creating Simple, Accessible Tables
| Task |
Code |
Comment |
| caption |
<caption>Creating Tables</caption> |
Accessibility. |
| table |
<table><tr><td>Data</td></tr<table> |
|
| header |
<th></th> |
Substitute for <td> column or row tags |
| align |
<td align="center">Data</td> |
Can also be done in CSS: |
| vertical align |
<td valign="top">Data</td> |
|
| Nesting Tables |
Don't! |
Accessibility problems. Provide Navigation. |
| cell background color |
<td bgcolor="#339966">Data</td> |
|
| table bgcolor |
<table bgcolor attribute is deprecated. |
Use CSS table{background:#CCF;} |