Open In App
Related Articles

Bootstrap 4 | Jumbotron

Improve Article
Improve
Save Article
Save
Like Article
Like

A jumbotron is a big grey box used to indicate some text which requires extra attention. Any text that seems to be important can be written inside a jumbotron to make it appear big and noticeable.

Steps to add jumbotron:

  • Use a jumbotron class inside a div element.
  • Write any text inside the div tag.
  • Close the div element.

Syntax:

<div class="jumbtron"> Contents... <div>

Example:

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bootstrap Jumbotron</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body style="text-align:center;">
    <div class="container">
        <div class="jumbotron">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1>
             
<p>A computer science portal for geeks</p>
 
        </div>
    </div>
</body>
</html>


Output:

Full-width Jumbotron: The .jumbotron-fluid and .container or .container-fluid classes is used to create a full-width jumbotron without rounded borders.

Syntax:

<div class="jumbotron jumbotron-fluid">
    <div class="container"> Contents... <div>
<div>

Example:

HTML




<!DOCTYPE html>
<html lang="en">
<head>
    <title>Bootstrap Jumbotron</title>
    <meta charset="utf-8">
    <meta name="viewport"
        content="width=device-width, initial-scale=1">
    <link rel="stylesheet" href=
    <script src=
    </script>
    <script src=
    </script>
    <script src=
    </script>
</head>
<body style="text-align:center;">
    <div class="container">
        <div class="jumbotron">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1>
             
<p>A computer science portal for geeks</p>
 
        </div>
    </div>
</body>
</html>


Output:


Supported Browser:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera
  • Safari

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 28 Apr, 2022
Like Article
Save Article
Previous
Next
Similar Reads
Complete Tutorials