Add Tabs to Any Website, No Plugin Needed

Put product details, plan types or a menu into tabs that work with a mouse, a finger or a keyboard. Describe them to the AI, then paste two lines of HTML into WordPress, Shopify, Squarespace or Wix.

A 22-litre daypack for long trail days. The back panel is ventilated mesh, the hip belt has two zip pockets, and the main zip opens all the way round so nothing hides at the bottom.

Style

Example content. Click a tab, or focus one and use the arrow keys.

Add Tabs to Squarespace, Wix, WordPress or Shopify

When you publish your tabs, MightyWidgets gives you this snippet with your widget's ID filled in. It is the same two lines on every platform:

<script src="https://cdn.mightywidgets.com/load.js" async></script>
<div data-mightywidgets-id="YOUR_WIDGET_ID"></div>

Only where you paste it changes:

WordPress

Add a Custom HTML block where the tabs should go and paste the snippet. No plugin needed, on any theme.

Shopify

In the theme editor, add a Custom Liquid section (or block) to the product or page template and paste the snippet.

Squarespace

Add a Code block and paste the snippet. Squarespace only runs scripts in Code blocks on its Core plan and above.

Wix

Add an Embed HTML element (Add, then Embed Code) and paste the snippet, then drag the box to the height of your tabs.

Webflow (Code Embed element), Ghost (HTML card) and plain .html files work the same way. Edit the tabs later and every page that embeds them updates.

Tabs or an Accordion?

Both hide content until someone asks for it. They suit different content, and picking the wrong one is the most common reason tabs feel awkward.

Use tabsUse an accordion
How many sections?2 to 67 or more
Label lengthOne or two wordsFull questions or sentences
How people read itJump to the one section they wantScan down, open a few
Main deviceDesktop, or a short tab bar on mobileMostly phones
Comparing sections?Yes, side by side viewsNo, each stands alone
Typical useProduct details, plan types, menus by mealFAQs, policies, long guides

If most of your visitors are on phones and you have more than four sections, an accordion is usually the better fit. You can also have both: ask for tabs that turn into an accordion on small screens.

What Makes Tabs Accessible

Plenty of tabs widgets are a row of clickable divs. They look right and fail anyone using a keyboard or a screen reader. Accessible tabs follow the WAI-ARIA tabs pattern, which comes down to four checks you can run on any tabs widget, including ours:

  1. Tab lands on the active tab only. Press Tab once and focus goes to the selected tab, not through every label.
  2. Arrow keys move between tabs. Left and Right (Up and Down for vertical tabs) switch tabs; Home and End jump to the first and last.
  3. A screen reader says "tab, 2 of 4, selected". That needs role="tab" inside a role="tablist", with aria-selected on each tab.
  4. Each panel is labelled by its tab. Panels have role="tabpanel" and aria-labelledby pointing at their tab, and hidden panels use the hidden attribute.

The demo at the top of this page passes all four. When you build tabs with MightyWidgets, ask for "keyboard-accessible tabs" and check the result the same way.

Prefer to write the tabs yourself?

Here is the whole pattern in plain HTML and JavaScript, free to copy. It handles clicks, arrow keys, Home and End, and works for any number of tab sets on a page.

<div role="tablist" aria-label="Product details">
  <button role="tab" id="tab-1" aria-controls="panel-1" aria-selected="true">Description</button>
  <button role="tab" id="tab-2" aria-controls="panel-2" aria-selected="false" tabindex="-1">Specs</button>
  <button role="tab" id="tab-3" aria-controls="panel-3" aria-selected="false" tabindex="-1">Shipping</button>
</div>
<div role="tabpanel" id="panel-1" aria-labelledby="tab-1" tabindex="0">...</div>
<div role="tabpanel" id="panel-2" aria-labelledby="tab-2" tabindex="0" hidden>...</div>
<div role="tabpanel" id="panel-3" aria-labelledby="tab-3" tabindex="0" hidden>...</div>

<script>
  document.querySelectorAll('[role="tablist"]').forEach((list) => {
    const tabs = [...list.querySelectorAll('[role="tab"]')];

    function select(tab) {
      for (const t of tabs) {
        const on = t === tab;
        t.setAttribute('aria-selected', on);
        t.tabIndex = on ? 0 : -1;
        document.getElementById(t.getAttribute('aria-controls')).hidden = !on;
      }
      tab.focus();
    }

    list.addEventListener('click', (e) => {
      const tab = e.target.closest('[role="tab"]');
      if (tab) select(tab);
    });

    list.addEventListener('keydown', (e) => {
      const i = tabs.indexOf(document.activeElement);
      const next = { ArrowRight: i + 1, ArrowLeft: i - 1, Home: 0, End: tabs.length - 1 }[e.key];
      if (i < 0 || next === undefined) return;
      e.preventDefault();
      select(tabs[(next + tabs.length) % tabs.length]);
    });
  });
</script>

What it leaves out is the styling, the mobile behaviour and changing the content without editing your site. That is what the builder is for.

Is Content in Hidden Tabs Bad for SEO?

Not on its own. Google has said that text tucked into tabs or accordions for the sake of the layout gets full weight, as long as it is in the page's HTML.

The catch is embedded widgets, ours included. Their content is drawn by JavaScript after your page loads, so search engines are less dependable about crediting it to your page. Keep the sentences you most need to rank for in your page's own copy, and use tabs for the supporting detail: specs, shipping, sizes, schedules.

Layouts You Can Ask For

A browser displays a "Tabs Widget" demo with horizontal and vertical layouts, featuring "Overview" and "General" tabs.
Horizontal or vertical. A tab bar across the top suits three to six short labels. Vertical tabs down the side fit more sections and longer labels.
A tabs widget on a webpage shows "Content B: Flexible Layouts" with animation controls below.
Transitions, or none. A quick fade or slide between panels, at the speed you choose. Anyone with reduced motion turned on can get instant switching instead.
A browser window displays a Tabs Widget showing Documentation, Messages, New Features, and Settings.
Icons and badges. Put an icon beside each label, a count badge on a tab, or use icons alone on narrow screens.

Prompts to Start From

Describe your tabs the way you would to a designer. These are good starting points:

  • Product page: "Tabs for Description, Size guide, Shipping and Reviews. Underline the active tab in our green, #2f7d4f."
  • Restaurant: "Breakfast, Lunch and Dinner tabs. Each panel lists dishes with prices, and today's meal is selected based on the time."
  • Studio schedule: "A tab for each weekday showing class times and the instructor. On phones, turn the tabs into an accordion."
  • Plans: "Monthly and Yearly tabs that switch the prices on three plan cards. Show a Save 20% badge on the Yearly tab."

Tabs Widget Questions

Is the tabs widget free?

Yes, to start. The Free plan includes 50 credits for building and editing with AI, and your widget's first 100 loads each month are free. After that each load uses one credit; if you run out, the tabs keep working with a small "Powered by MightyWidgets" tag.

Do I need a plugin to add tabs in WordPress?

No. Paste the snippet into a Custom HTML block. If your theme or page builder (Elementor, Kadence, Spectra) already has a tabs block, that is a fine choice too. MightyWidgets helps when you want a design those blocks do not offer, or the same tabs on more than one site.

How many tabs is too many?

Past six, or as soon as the labels stop fitting on one row on a phone. At that point use vertical tabs, or an accordion, which handles long lists and long labels better.

What happens to tabs on mobile?

Tell the AI which you prefer: a tab bar that scrolls sideways, labels that wrap onto two rows, or tabs that turn into an accordion below a certain screen width. The accordion option is usually best when you have more than three or four tabs.

Can I put images, videos or forms inside a tab?

Yes, any content works. One tip for video: ask for it to pause when the visitor switches tabs, otherwise it keeps playing in the hidden panel.

Does Google index content inside tabs?

Text in tabs on your own page is indexed like any other text, as long as it is in the page's HTML. Content inside an embedded widget is drawn by JavaScript after the page loads, so keep the few sentences you most need to rank for in your page's own copy and use the tabs for supporting detail.

Can I change the tabs after they are on my site?

Yes. Edit the widget in your dashboard (or ask the AI for the change) and publish. Every page that embeds it updates, and the snippet never changes.

Build Your Tabs

Describe the sections you need and paste the snippet. Free to start.

Get Started Free