Containers are used to pad the content inside of them, and there are two container classes available:
1. The .container class provides a responsive fixed width container
2. The .container-fluid class provides a full width container, spanning the entire width of the viewport
Containers are a fundamental building block of Bootstrap that contain, pad, and align your content within a given device or viewport.
Use the .container class to create responsive, fixed-width container.
note that its width (max-width) will change on different screen sizes.
Example:
<div class="container">
<h1>welcome to soopro pathshala</h1>
<p>This is my first bootstarp page.</p>
</div>
Use the .container-fluid class to create a full width container, that will always span the entire width of the screen (width is always 100%):
Example:
<div class="container-fluid">
<h1>Welcome to soopro pathshala</h1>
<p>Example of bootstrap fluid container.</p>
</div>
By default, containers have left and right padding, with no top or bottom padding. Therefore, we often use spacing utilities, such as extra padding and margins to make them look even better. For example, .pt-5 means "add a large top padding":
Example:
<div class="container pt-5"></div>