Bootstrap Spacing Utilities
Bootstrap provides various classes for adding spacing to elements, including margin and padding. These classes make it easy to create consistent spacing throughout your website.
Syntax
Bootstrap uses a specific naming convention for its spacing classes. Classes for margin and padding start with "m" and "p" respectively, followed by a hyphen and a value of 1 to 5, where 1 is the smallest and 5 is the largest. For example, m-4
adds a margin of 1.5rem to all sides of the element.
There are also classes that specify the direction of the margin or padding, such as ml-2
which adds a left margin of 0.5rem.