NextIndexPrevious

Programs in Bootstrap

12. Bootstrap tabs example.

<html>
<head>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<script src="js/jquery.min.js"></script>
</head>
<body>

<div>

  <!-- Nav tabs -->
  <ul class="nav nav-tabs" role="tablist">
    <li role="presentation" class="active"><a href="#home" aria-controls="home" role="tab" data-toggle="tab">Home</a></li>
    <li role="presentation"><a href="#profile" aria-controls="profile" role="tab" data-toggle="tab">Profile</a></li>
    <li role="presentation"><a href="#messages" aria-controls="messages" role="tab" data-toggle="tab">Messages</a></li>
    <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
  </ul>

  <!-- Tab panes -->
  <div class="tab-content">
    <div role="tabpanel" class="tab-pane active" id="home">
    	<p>Home Content</p>
    </div>
    <div role="tabpanel" class="tab-pane" id="profile">
    	<p>Profile Content</p>
    </div>
    <div role="tabpanel" class="tab-pane" id="messages">	
    	<p>Messages Content</p>
    </div>
    <div role="tabpanel" class="tab-pane" id="settings">
    	<p>Settings Content</p>
    </div>
  </div>

</div>

<script src="js/bootstrap.min.js"></script>
</body>
</html>

Output :

Home Content

Profile Content

Messages Content

Settings Content





Father of JavaScript


Brendan Eich

Brendan Eich

Born: 1961, Pennsylvania
Google+