---
title: Tabs
---
***
### Horizontal Tabs
{{> examples_tabs_intro}}
### Vertical Tabs
{{> examples_tabs_vertical_intro}}
***
Basic
You can create a group of horizontal tabs using minimal markup.
HTML
{{#markdown}}
```html
{{> examples_tabs_basic}}
```
{{/markdown}}
Rendered HTML
{{> examples_tabs_basic_rendered}}
***
### Vertical Tabs
You can create a group of vertical tabs using minimal markup. Just adding the class `vertical` changes the orientation of horizontal tabs.
HTML
{{#markdown}}
```html
{{> examples_tabs_vertical_basic}}
```
{{/markdown}}
Rendered HTML
{{> examples_tabs_vertical_basic_rendered}}
***
### Deep linking to tabs or tab contents
The tabs Foundation component can parse the location hash value and open the corresponding tab content pane. To enable deep linking set `data-options="deep_linking:true"`. If the location hash maps to an element ID within a tab content pane, then the appropriate tab will become active and the browser window will scroll to the specified element. If you do not want to scroll to the specified element then set `data-options="scroll_to_content: false"`.
In the following example, deep linking is enabled. If the location hash is `#tabs-deeplink-2` then the second tab will become active. If the location hash is `#tabs-deeplink-content-2` then the second tab will become active, and the browser will scroll to the paragraph tag with ID, tabs-deeplink-content-2.
{{> examples_tabs_deep_linking}}
***
### Callbacks
There are two ways to bind to callbacks in your tabs.
{{#markdown}}
Callback function
```html
```
{{/markdown}}
{{#markdown}}
Toggled Event
```html
```
{{/markdown}}
***
## Accessibility
You can make tabs more accessible by using the code snippet below. The tabs are keyboard accessible meaning that a user can use the tab key or arrow keys to navigate through them. The role of `tablist` tells a screen reader what the element is and reads the necessary content.
HTML
{{#markdown}}
```html
{{> examples_tabs_accessibility}}
```
{{/markdown}}
Rendered HTML
{{> examples_tabs_accessibility}}
***
## Customize with Sass
Tabs can be easily customized with the Sass variables provided in the `_settings.scss` file.
SCSS
{{> examples_tabs_variables}}
***
##### Sass Errors?
If the default "foundation" import was commented out, then make sure you import this file:
SCSS
```scss
@import "foundation/components/tabs";
```