What are containers in Bootstrap?

Containers are a fundamental building block of Bootstrap that contain, pad, and align your content within a given device or viewport.

Containers are the most basic layout element in Bootstrap and are required when using our default grid system. Containers are used to contain, pad, and (sometimes) center the content within them. While containers can be nested, most layouts do not require a nested container.

Bootstrap comes with three different containers:

container, which sets a max-width at each responsive breakpoint
container-fluid, which is width: 100% at all breakpoints
container-{breakpoint}, which is width: 100% until the specified breakpoint
The table below illustrates how each container’s max-width compares to the original .container and .container-fluid across each breakpoint.

Our default container class is a responsive, fixed-width container, meaning its max-width changes at each breakpoint.

<div class="container">
<!-- Content here -->