Here’s a step by step recipe with all the code you need to see how to create a tabbed interface in Twitter Bootstrap in a single HTML file.
The result will look something like this:
Try it out and grab the source for yourself here
Markup for the tabs
Bootstrap Tabs use an unordered list in conjunction with
divs that contain a nested
tab-pane for each
In this example the tab’s text is Sell. It could be any text but the most important attribute is the
#sell attribute. It must match a
div ID in the upcoming
One of the tabs should appear as selected. Use the
Here’s the full declaration for the tabs.
Next are the tab panes. The ID of each pane must match the
href attribute but without the pound sign:
Here’s all the code in context. Save this as an HTML file and it will create the same kind of interface shown in the screen shot
An error has occurred. Please try again later.