Table tags
Table has number of tags to define table structure on the web page.
- <table>
- <thead> – Table head
- <tbody> – Table body
- <tr> – Table row
- <th> – Table heading
- <td> – Table data
- <caption> – Table caption, contain text or title about table data.
- <tfoot> – Table footer
Example
<table border=”1″ width=”100%”> <caption>Product prices</caption> <thead> <tr> <th>Sr no</th> <th>Product</th> <th>Price</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Mouse</td> <td>Rs. 300</td> </tr> <tr> <td>2</td> <td>Monitor</td> <td>Rs. 3000</td> </tr> <tr> <td>1</td> <td>Keyboard</td> <td>Rs. 800</td> </tr> </tbody> <tfoot>3 Rows</tfoot> </table>