Free Online CSS Tabs Generator with Working Panels
Build a tab strip and its panels and switch between them in the preview. Set the tab padding, gap and font, pick an underline, pill or boxed indicator, choose the active and hover colours and style the panel area. The strip scrolls when the tabs overflow on a narrow screen.
These tabs are radio inputs and labels, so they switch with no JavaScript at all. The second set is squeezed into a narrow box to show the strip scrolling sideways when the tabs do not fit.
Enjoying WizTools123? Help keep our server infrastructure 100% free and open for everyone.
How to Build CSS Tabs
A few steps, and nothing is uploaded.
What to Know About Tabs
Including why the radio trick is not accessible as tabs.
role="tablist", role="tab", aria-selected and aria-controls, with the arrow key handler that the pattern requires.
overflow-x: auto with flex-shrink: 0 on the tabs, so the row stays one line and scrolls. Consider adding scroll-snap-type if you want the tabs to settle neatly, and keep the strip reachable, since a scroll container with no visible scrollbar can be hard to discover.
Key Features & Capabilities
What this tool does, and what it deliberately does not.
About the CSS Tabs Generator
Tabs are one of the few controls where the CSS only version really does work. A group of radio inputs holds the state, labels act as the tabs because a label activates its input, and a sibling selector shows the matching panel. There is no script anywhere, it survives a failed bundle, and it is short enough to read. The preview on this page is exactly that, which is why clicking a tab switches it with nothing running.
What the technique cannot do is announce itself correctly. To an assistive technology user the strip is a radio group and the panels are plain content, so the relationship the visual design is expressing does not exist in the accessibility tree. That is a real limitation and not one worth papering over, so the tool writes the ARIA version as well: the same CSS, different markup, plus the arrow key handling the tab pattern requires. Choose according to what the tabs are for.
The layout detail worth noticing is the strip. Tabs must stay on one line, because a wrapped strip reads as a broken layout, so the strip is a flex row with overflow-x: auto and tabs that refuse to shrink. The preview includes a deliberately narrow copy of the same tabs so you can see that behaviour rather than take it on trust, which is the part most tab CSS gets wrong the first time it meets a phone.
Frequently Asked Questions
The radio technique, ARIA roles, overflow and deep links.