How to create Bootstrap Jumbotron and where to use
Today, We will learn how to create bootstrap Jumbotron and use of Bootstrap Jumbotron. Read: How to write code Bootstrap Image
A jumbotron indicates a big grey box for calling extra attention to some special content or information. Any text that seems to be important can be written inside a jumbotron to make it appear big and noticeable. This also enlarges the font sizes of the text inside it. Here is the sample example.
Tip: Inside a jumbotron, you can put nearly any valid HTML, including other Bootstrap elements/classes.
Do you know Why this named Jumbotron?
In 1980, Mitsubishi introduced the first large-scale video board, the Diamond Vision, which was a large screen using cathode-ray tube technology similar to traditional tube televisions. In 1985, the term “JumboTron” was coined by Sony for its large-scale video board.
How to create Bootstrap Jumbotron?
Use a <div>
element with class .jumbotron
to create a jumbotron:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="jumbotron">
<h1>Bootstrap Tutorial</h1>
<p>Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web.</p>
</div>
<p>This is some text.</p>
<p>This is another text.</p>
</div>
</body>
</html>
The output of the above code produces like the below:
Bootstrap Full-width Jumbotron
If you want a full-width jumbotron without rounded borders, add the .jumbotron-fluid
class and a .container
or .container-fluid
inside of it:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js"></script>
</head>
<body>
<div class="jumbotron jumbotron-fluid">
<div class="container">
<h1>Bootstrap Tutorial</h1>
<p>Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile-first projects on the web.</p>
</div>
</div>
<div class="container">
<p>This is some text.</p>
<p>This is another text.</p>
</div>
</body>
</html>
The output of the above code looks like as:
Also read: What are Bootstrap Tables and How to create
Pingback: What is Bootstrap Container and How to use in HTML - Eduguru
Pingback: How to create bootstrap buttons - Eduguru