Bootstrap Tutorial - Bootstrap Jumbotron








Bootstrap jumbotron component shows the key content on a web page.

Just wrap featured content like heading, descriptions etc. in a <div> element and apply the class .jumbotron on it.

<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<style type="text/css">
    .jumbotron{<!-- w w w  . jav a 2 s.co  m-->
      margin-top: 15px;
    }
</style>
</head>
<body>
<div class="container">
  <div class="row">
      <div class="col-xs-12">
          <div class="jumbotron">
                <h1>Learn to Create Websites</h1>
              <p>This is a test. This is a test. This is a test. This is a test. 
              This is a test. This is a test. This is a test. This is a test. 
              This is a test. This is a test. This is a test. This is a test. </p>
              <p><a href="" target="_blank" class="btn btn-primary btn-lg">Get started today</a></p>
            </div>
        </div>
    </div>
</div>
</body>
</html>

Click to view the demo





Full size

To create a jumbotron without rounded corners and cover the full width of the viewport, place it outside the all containers and add the .container within it.

<!-- www  .j a  v  a  2  s.c o m-->
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</head>
<body>
<div class="jumbotron">
    <div class="container">
        <h1>Learn to Create Websites</h1>
        <p>This is a test. This is a test. This is a test. This is a test. This is a test. 
        This is a test. This is a test. This is a test. This is a test. </p>
        <p><a href="" target="_blank" class="btn btn-primary btn-lg">Get started today</a></p>
    </div>
</div>
</body>
</html>

Click to view the demo