CodeLab
Tutorials For Everyone
Run
<!Doctype HTML> <html> <head> <title>CSS Tables</title> <style> table{ font-size: 14px; text-align: justify; } table thead{ font-weight: 900; background: #3949ab; color: #fff; } table tbody tr td:hover{ background: #f7f7f4; } table{ border: 1px solid #999; width: 100%; border-collapse: collapse; } table tr td{ padding: 5px; padding-left: 10px; padding-right: 10px; } table td{ border: 1px solid #ddd; } </style> </head> <body> <h2>CSS Tables</h2> <hr> Below is a simplest table: <table> <thead> <tr> <td>Customer</td> <td>Products</td> <td>Address</td> </tr> </thead> <tbody> <tr> <td>Gregory A Washington</td> <td>Pasta and Noodles</td> <td>998 George Street, Florida</td> </tr> <tr> <td>Veronika</td> <td>Tea, Bread and Milk</td> <td>352 Sundown Lane, Iowa</td> </tr> <tr> <td>Alfred</td> <td>Cereal and Muesli</td> <td>4528 Baker Avenue, Dallas</td> </tr> <tr> <td>Christi J Herman</td> <td>Dried Fruits, Nuts and Seeds</td> <td>1209 Ryder Avenue, Washington</td> </tr> </tbody> </table> </body> </html>