Tables in HTML Pages

The Web Book

Horizontal Table

Product Information
Product Quantity Price
Ladies Shoes 1 $49.99
Total 1 $49.99

Vertical Table

Product Men's Shirt Total
Quantity 1 1
Price $30.00 $30.00

HTML Tables Example Code

<!DOCTYPE html> <html> <body> <h4>Horizontal Table</h4> <table border="1"> <thead><b>Product Information</b></thead> <tbody> <tr> <th>Product</th> <th>Quantity</th> <th>Price</th> </tr> <tr> <td>Ladies Shoes</td> <td>1</td> <td>$49.99</td> </tr> </tbody> <tfoot> <tr> <td><b>Total</b></td> <td><b>1</b></td> <td><b>$49.99</b></td> </tr> </tfoot> </table> <h4>Vertical Table</h4> <table border="1"> <tbody> <tr> <th>Product</th> <td>Men's Shirt</td> <td><b>Total</b></td> </tr> <tr> <th>Quantity</th> <td>1</td> <td><b>1</b></td> </tr> <tr> <th>Price</th> <td>$30.00</td> <td><b>$30.00</b></td> </tr> </tbody> </table> </div> </body> </html> Back