Tables
HTML Tables HTML tables allow web developers to arrange data into rows and columns. Define an HTML Table A table in HTML consists of table cells inside rows and columns. Example
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
<!DOCTYPE html> <html> <style> table, th, td { border:1px solid black; } </style> <body> <h3>A basic HTML table</h3> <table style="width:100%"> <tr> <th>Company</th> <th>Contact</th> <th>Country</th> </tr> <tr> <td>Alfreds Futterkiste</td> <td>Maria Anders</td> <td>Germany</td> </tr> <tr> <td>Centro comercial Moctezuma</td> <td>Francisco Chang</td> <td>Mexico</td> </tr> </table> <p>To understand the example better, we have added borders to the table.</p> </body> </html> |
Result A basic HTML table Company Contact Country Alfreds Futterkiste Maria Anders Germany Centro comercial Moctezuma Francisco Chang Mexico To understand the example better, […]