![]() |
VOOZH | about |
Bootstrap5 Layout Containers are considered the most basic layout that can be used and they can be used to contain other layouts. Containers are basically used to add pad the contents inside or center the items inside the container. In this article, we'll see Bootstrap 5 Layout Containers.
Layout Containers: There are three types of containers available in Bootstrap i.e., Default container, Fluid container, and responsive container.
Syntax:
<div class="Container-class">
// Content
</div>
Example 1: The code demonstrates how we can apply the default and fluid container in basic <div> element. Here the first div is a Default container and the second one is the Fluid container.
Output:
Example 2: The code demonstrates the Responsive container in an <div> element. The first div attains container properties after sm viewport size, the second after md viewport size, and the last one after lg viewport size.
Output:
Reference:https://getbootstrap.com/docs/5.0/layout/containers/