HTML and CSS only tabs

Basic shortcodes Link to heading

The following content:

1{{< tabgroup >}}
2  {{< tab name="Hello" >}}
3  Hello World!
4  {{< /tab >}}
5
6  {{< tab name="Goodbye" >}}
7  Goodbye Everybody!
8  {{< /tab >}}
9{{< /tabgroup >}}

Will generate:

Hello World!
Goodbye Everybody!

Right alighment Link to heading

You can also align the tabs to the right:

1{{< tabgroup align="right" >}}
2  {{< tab name="Hello" >}}
3  Hello World!
4  {{< /tab >}}
5
6  {{< tab name="Goodbye" >}}
7  Goodbye Everybody!
8  {{< /tab >}}
9{{< /tabgroup >}}

Giving you this look:

Hello World!
Goodbye Everybody!

Markdown content Link to heading

Any valid markdown can be used inside the tab:

 1{{< tabgroup align="right" style="code" >}}
 2  {{< tab name="Ruby" >}}
 3
 4```ruby
 5puts 'Hello'
 6```
 7
 8  {{< /tab >}}
 9  {{< tab name="Python" >}}
10
11```python
12print('Hello')
13```
14
15  {{< /tab >}}
16  {{< tab name="JavaScript" >}}
17
18```js
19console.log('Hello')
20```
21
22  {{< /tab >}}
23{{< /tabgroup >}}

And you get this lovely content:

1puts 'Hello'
1print('Hello')
1console.log('Hello')

In this case style="code" makes it look a little nicer for scenarios where your content purely a code block.

See also in Themes Guide Link to heading