Explore Bato Web Agency Webflow Certified Partner Profile Explore Bato Web Agency Webflow Certified Partner Profile

How do you make a wide HTML table usable on mobile?

Illustration without a description Illustration without a description

Keep the semantic HTML table and place it inside a horizontally scrollable wrapper when its columns must remain comparable. A local scroller is safer than shrinking text, hiding columns or forcing the entire page to scroll sideways.

 

<div class="table-scroll" tabindex="0" role="region" aria-label="Quarterly revenue table">
<table>
<caption>Quarterly revenue</caption>
<thead><tr><th scope="col">Quarter</th><th scope="col">Revenue</th></tr></thead>
<tbody><tr><th scope="row">Q1</th><td>$24,000</td></tr></tbody>
</table>
</div>

 

.table-scroll {
max-inline-size: 100%;
overflow-x: auto;
}

table {
border-collapse: collapse;
min-inline-size: 48rem;
}

 

Use proper caption, header cells and scope relationships so screen readers retain the row and column context. A focusable scrolling region can help keyboard users, but test whether the browser already makes it focusable and avoid adding redundant stops. Provide a visible cue when more columns continue off screen.

 

For very large datasets, offer column selection, a summary or a task-specific alternative. Sticky first columns and headers can help orientation but need contrast and overlap testing. Do not duplicate the table as visually styled cards unless the alternative preserves every header relationship and remains maintainable.

 

Test touch panning, keyboard scrolling, zoom and screen-reader table navigation. The page itself should stay fixed to the viewport while only the table region scrolls horizontally. Ensure focus indicators and tooltips are not clipped by the wrapper.