<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Creating Responsive Tables</title> <style> table { width: 100%; border-collapse: collapse; } th, td { padding: 10px; text-align: center; border: 5px solid purple; white-space: nowrap; /* to prevent text wrapping */ } .responsive-table { overflow-x: auto; } </style> </head> <body> <div class="responsive-table"> <table> <thead> <tr> <th>S.No</th> <th>Student Name</th> <th>subject</th> <th>Mark</th> <th>Result</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Raj</td> <td>Tamil</td> <td>79</td> <td>Pass</td> </tr> <tr> <td>2</td> <td>Ram</td> <td>English</td> <td>80</td> <td>Pass</td> </tr> <tr> <td>3</td> <td>Ravi</td> <td>Maths</td> <td>30</td> <td>Fail</td> </tr> <tr> <td>4</td> <td>Ragul</td> <td>Science</td> <td>60</td> <td>Pass</td> </tr> <tr> <td>5</td> <td>Ramesh</td> <td>Social</td> <td>70</td> <td>pass</td> </tr> </tbody> </table> </div> <p><strong>Note:</strong> Toggle the editor layout or open the output in a blank window and resize it to understand how responsive table works.</p> </body> </html>