How to create Table with 100% width, with Vertical Scroll inside Table body in HTML? Last Updated : 11 Jul, 2025 Comments Improve Suggest changes Like Article Like Report To create a table with 100% width and a vertical scroll inside the table body in HTML, use the overflow-y property. Set the <tbody> display to block to enable scrolling while adjusting the <thead> to maintain the layout. This method creates a scrollable table for effectively displaying large datasets, enhancing user experience with an HTML table scrollable design.ApproachApply the class scroll down to the table for styling.Set width: 100% to make the table span the entire width.Enable vertical scrolling in the tbody with height: 50px and overflow-y: auto.Style columns with a fixed width (width: 200px) and borders.Improve header appearance with a fixed height and centered content.Example: In this example, we will see how to create a table with 100% width, with a vertical scroll inside the table body in HTML. html <!DOCTYPE html> <html> <head> <title> Display table with vertical scrollbar </title> <style> table.scrolldown { width: 100%; /* border-collapse: collapse; */ border-spacing: 0; border: 2px solid black; } /* To display the block as level element */ table.scrolldown tbody, table.scrolldown thead { display: block; } thead tr th { height: 40px; line-height: 40px; } table.scrolldown tbody { /* Set the height of table body */ height: 50px; /* Set vertical scroll */ overflow-y: auto; /* Hide the horizontal scroll */ overflow-x: hidden; } tbody { border-top: 2px solid black; } tbody td, thead th { width: 200px; border-right: 2px solid black; } td { text-align: center; } </style> </head> <body> <table class="scrolldown"> <!-- Table head content --> <thead> <tr> <th>Heading 1</th> <th>Heading 2</th> <th>Heading 3</th> <th>Heading 4</th> <th>Heading 5</th> </tr> </thead> <!-- Table body content --> <tbody> <tr> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> </tr> <tr> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> </tr> <tr> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> </tr> <tr> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> </tr> <tr> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> <td>Content</td> </tr> </tbody> </table> <body> </html> Output: How to create table with 100% width, with vertical scroll inside table body in HTML ? Comment More info C ChinkitManchanda Follow Improve Article Tags : Web Technologies HTML HTML-Misc HTML-Questions Explore HTML BasicsHTML Introduction5 min readHTML Editors5 min readHTML Basics7 min readStructure & ElementsHTML Elements5 min readHTML Attributes8 min readHTML Headings4 min readHTML Paragraphs5 min readHTML Text Formatting4 min readHTML Block and Inline Elements3 min readHTML Charsets4 min readListsHTML Lists5 min readHTML Ordered Lists5 min readHTML Unordered Lists4 min readHTML Description Lists3 min readVisuals & MediaHTML Colors11 min readHTML Links Hyperlinks3 min readHTML Images7 min readHTML Favicon4 min readHTML Video4 min readLayouts & DesignsHTML Tables10 min readHTML Iframes4 min readHTML Layout4 min readHTML File Paths3 min readProjects & Advanced TopicsHTML Forms5 min readHTML5 Semantics6 min readHTML URL Encoding4 min readHTML Responsive Web Design11 min readTop 10 Projects For Beginners To Practice HTML and CSS Skills8 min readTutorial ReferencesHTML Tags - A to Z List15+ min readHTML Attributes Complete Reference8 min readHTML Global Attributes5 min readHTML5 Complete Reference8 min readHTML5 MathML Complete Reference3 min readHTML DOM Complete Reference15+ min readHTML DOM Audio/Video Complete Reference2 min readSVG Element Complete Reference5 min readSVG Attribute Complete Reference8 min readSVG Property Complete Reference7 min readHTML Canvas Complete Reference4 min read Like