What are Containers in Bootstrap? How many types of containers are there in the Bootstrap?

Asked 28-Jul-2021
Viewed 1237 times

0

What are Containers in Bootstrap? How many types of containers are there in the Bootstrap?


1 Answer


0

In Bootstrap, the container is used to set the content margin with the responsive behavior of your page. This class is the main class of bootstrap for making the responsive page. The bootstrap has two types of containers.
  1. container
  2. container-fluid

The container class is the default layout in Bootstrap. This class has written some predefined margins. And there are 5 types of classes used in the container class. 

  1. container-sm  small breakpoint
  2. container-md medium breakpoint
  3. container-lg     large breakpoint
  4. container-xl     extra-large breakpoint 
  5. container-xxl    extra-extra-large breakpoint

Syntax 

<div class='container'>
    other tags 
</div>

The container-fluid class in the bootstrap is used for a full-width container, it takes the entire width of the viewport.

Syntax 

<div class='container-fluid'>

    other tags
</div>