Tables often get a bad rap from standards-based web developers due to the fact that for many years tables were used to layout web pages. That being said, you should never use tables for layout purposes, but they are perfectly acceptable as a means to mark up information that should be presented in a tabular format.
Here are the basic mark up elements (tags) of a table.
Here is an example of a bare bones Table structure with a horizontal header.
| Item | Quantity | Cost |
|---|---|---|
| Jolt | 6 | .75 |
| Doritos | 3 | 2.95 |
| Ramen | 12 | .99 |
Here is the code for the example above, Notice the addition of the border attribute on the <table> tag and scope attribute on the <th>
<table border="1">
<tr><th scope="col">Item</th><th scope="col">Quantity</th> <th scope="col">Cost</th></tr> <tr><td>Jolt</td><td>6</td><td>.75</td></tr>
<tr><td>Doritos</td><td>3</td><td>2.95</td></tr>
<tr><td>Ramen</td><td>12</td><td>.99</td></tr>
</table>
* should be styled with CSS rather than inline values when possible