Utility classes are predefined and reused many times. This avoids writing many custom CSS rules that repeat similar styles, which keeps the CSS file smaller.
Utility classes are added as class names in HTML elements, so developers can style elements quickly without switching to CSS files.
mt-1, mt-2, etc. Which class sets the top margin to 3rem?In Bootstrap, mt-5 sets margin-top to 3rem, which is the largest standard spacing.
p-md-4. How does this feature speed up creating responsive layouts?Responsive utility classes let developers specify styles for different screen sizes in HTML classes, avoiding manual media queries and speeding development.
Utility classes style elements but do not add meaning. Overusing them without proper semantic tags can make content confusing for assistive technologies.
