<html><head><link rel="canonical" href="https://www.jetbrains.com/help/writerside/tabs.html.md/" data-react-helmet="true"/></head><body># Tabs

Use tab blocks to create switchable sections of content, for example, instructions for different platforms or languages, user roles or scenarios.

To add a block of tabs, use the  [&lt;tabs&gt;](semantic-markup-reference.html#tabs)  elements with  [&lt;tab&gt;](semantic-markup-reference.html#tab)  sub-elements.

```XML
<tabs>
    <tab id="windows-install" title="Windows">
        How to install on Windows.
    </tab>
    <tab id="macos-install" title="macOS">
        How to install on macOS.
    </tab>
    <tab id="linux-install" title="Linux">
        How to install on Linux.
    </tab>
</tabs>
```

Windows:
How to install on Windows.

macOS:
How to install on macOS.

Linux:
How to install on Linux.

If you have several tab blocks for the same switchable items, you can synchronize them so that when the reader switches in one block, the same tab will open in all other blocks on the page. To do this, define the [group](semantic-markup-reference.html#tabs_group) attribute for  [&lt;tabs&gt;](semantic-markup-reference.html#tabs)  and the [group-key](semantic-markup-reference.html#tab_group-key) attribute for  [&lt;tab&gt;](semantic-markup-reference.html#tab) .

```XML
<tabs group="os">
    <tab id="windows-install" title="Windows" group-key="windows">
        How to install on Windows.
    </tab>
    <tab id="macos-install" title="macOS" group-key="macos">
        How to install on macOS.
    </tab>
    <tab id="linux-install" title="Linux" group-key="linux">
        How to install on Linux.
    </tab>
</tabs>
```

Notice how the same tab opens when you select it in all tab groups on this page:

Windows:
How to uninstall on Windows.

macOS:
How to uninstall on macOS.

Linux:
How to uninstall on Linux.

&gt; **Tip:**
&gt; If you want to show tab titles in the [topic navigation](structural-elements.html#topic-navigation), add `<show-structure for="tab">` to the topic. For more information, see  [&lt;show-structure&gt;](semantic-markup-reference.html#show-structure) .

## Topic-level switcher

Instead of separate tab blocks, you can add one switcher for the whole topic and mark pieces of content that apply to a specific platform or user role.

You can mark any element using the `switcher-key` attribute. Writerside will add all unique switcher keys that appear in this topic.

Semantic markup:

```XML
<topic title="Topic title" switcher-label="Language">
    ...
    <chapter title="Examples" switcher-key="Java">
        <p>Some Java examples.</p>
    </chapter>

    <chapter title="Examples" switcher-key="Kotlin">
        <p>Some Kotlin examples.</p>
    </chapter>
    ...
```

Markdown:

```PLAINTEXT
---
switcher-label: Language
---
# Topic title

...

## Section One {switcher-key="Java"}

Some Java examples.

## Section Two {switcher-key="Kotlin"}

Some Kotlin examples.
...
```

At the top of this page, use the `Language` switcher to change between `Java` and `Kotlin`, and see how Writerside shows only one or the other chapter:

### Examples

Some Java examples.

### Examples

Some Kotlin examples.

&gt; **Tip:**
&gt; By default, the switcher title is `Section`, but you can change it using the [switcher-label](semantic-markup-reference.html#topic_switcher-label) attribute of the root  [&lt;topic&gt;](semantic-markup-reference.html#topic)  element. In Markdown, you can use the front matter block for this.

</topic></show-structure></body></html>