Quickly style elements with Bootstrap's powerful utility classes.
Apply theme colors to text using .text-{color} classes:
.text-primary
Primary text
.text-secondary
Secondary text
.text-success
Success text
.text-danger
Danger text
.text-warning
Warning text
.text-info
Info text
.text-muted
Muted text
Apply background colors using .bg-{color} classes:
.bg-primary
.bg-secondary
.bg-success
.bg-danger
.bg-warning
.bg-info
.bg-light
.bg-dark
.text-white or
.text-dark to ensure text is readable on colored
backgrounds.
Bootstrap uses shorthand notation:
{property}{sides}-{size}
p = Paddingm = Margint = Topb = Bottoms = Start (left)e = End (right)x = Horizontal (left & right)y = Vertical (top & bottom).p-3 (all sides)
.pt-3 (top only)
.px-5 (horizontal)
.py-4 (vertical)
.m-3 (all sides)
.mt-4 (top only)
.ms-5 (start/left only)
0 (none) to
5 (largest). Example: .p-0, .p-1,
... .p-5
.border
.border-top
.border-start
.border .border-1
.border .border-3
.border .border-5
.border-primary
.border-success
.border-danger
.border-warning
.rounded-0
.rounded-1
.rounded-3
.rounded-pill
.rounded-top
.rounded-circle
Add depth to elements with shadow utilities:
.shadow-sm
.shadow
.shadow-lg
.rounded classes for a modern card-like appearance!