Bootstrap 4 | Jumbotron

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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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>                    

chevron_right


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:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!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="jumbotron jumbotron-fluid">
        <div class="container">
            <h1 style="color:green;">
                GeeksforGeeks
            </h1
              
            <p>A computer science portal for geeks</p>
        </div>
    </div>
      
    <p>Text content outside the jumbotron</p>
</body
  
</html>                    

chevron_right


Output:



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.