<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Example of CSS table-layout property</title> <style> table { width: 250px; border-collapse: separate; } table, tr, th, td{ border: 2px solid blue; } .auto { table-layout: auto; } .fixed { table-layout: fixed; } td{ width: 50%; } </style> </head> <body> <table class="auto"> <caption>Auto</caption> <tr> <th>Name</th> <td>Raj</td> </tr> <tr> <th>Email</th> <td>rajraj12345@gmail.com</td> </tr> </table> <br> <table class="fixed"> <caption>Fixed</caption> <tr> <th>Name</th> <td>Ram</td> </tr> <tr> <th>Email</th> <td>ramramq12345@mail.com</td> </tr> </table> <p><strong>Note:</strong> You can see the width of table cell does not change to accommodate the content in fixed table-layout.</p> </body> </html>