Edit each tab
Set the label and content text for every tab in the set.
Build a tabbed content switcher with your own labels and content, then copy the ready-to-use HTML, CSS and JavaScript.
Set the label and content text for every tab in the set.
Choose an underline indicator or a rounded pill-style active state.
Get accessible, ready-to-use HTML, CSS and JavaScript.
A small script toggles an "active" class on the clicked tab button and shows the matching panel by index, hiding the others.
Underline style highlights the active tab with a bottom border, while pill style gives the active tab a fully rounded background, similar to a segmented control.
The buttons use role="tab" and aria-selected, and the panels use role="tabpanel", giving assistive technology the standard tab pattern semantics.