Bootstrap 4 | Wells

A bootstrap well is something like a bootstrap panel with round borders and padding around it. This is used to create some attention towards some content of the webpage. The .well class adds a rounded border around the element with a gray background color and some padding. But we can change the text color and padding with the help of CSS.

Basic Well: The .well class are used to create basic well.

  • Example:
    filter_none

    edit
    close

    play_arrow

    link
    brightness_4
    code

    <!DOCTYPE html>
    <html lang="en">
      
    <head>
        <title>Bootstrap Wells</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>
    </head>
      
    <body>
      <div class="container">
        <h1 align="center" style="color: green;">
            GeeksforGeeks
        </h1>
        <h3 align="center">Bootstrap Wells</h3>
      
        <!-- By default wells are medium in size -->
        <div class="well">
            This is a bootstrap well 
        </div>
      </div>
    </body>
      
    </html>            

    chevron_right

    
    

  • Output:

Small Well: The .well-sm after .well class is used to create a small-sized well. small wells are as follows:

  • Example:
    filter_none

    edit
    close

    play_arrow

    link
    brightness_4
    code

    <!DOCTYPE html>
    <html lang="en">
      
    <head>
        <title>Bootstrap Wells</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>
    </head>
      
    <body>
    <div class="container">
        <h1 align="center" style="color: green;">
            GeeksforGeeks
        </h1>
        <h3 align="center">Bootstrap Wells</h3>
      
        <div class="well">
            This is a bootstrap well(Default) 
        </div>
          
        <div class="well well-sm">
            This is a bootstrap well-sm 
        </div>
    </div>
    </body>
      
    </html>                    

    chevron_right

    
    

  • Output:

Large Well: The .well-lg after .well class is used to create a small-sized well. Large wells are as follows:

  • Example:
    filter_none

    edit
    close

    play_arrow

    link
    brightness_4
    code

    <!DOCTYPE html>
    <html lang="en">
      
    <head>
        <title>Bootstrap Wells</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>
    </head>
      
    <body>
    <div class="container">
        <h1 align="center" style="color: green;">
            GeeksforGeeks
        </h1>
        <h3 align="center">Bootstrap Wells</h3>
      
        <div class="well">
            This is a bootstrap well(Default) 
        </div>
          
        <div class="well well-lg">
            This is a bootstrap well-lg 
        </div>
    </div>
    </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.