Bootstrap class attributes
ContainerContainers are a fundamental building block of Bootstrap that contain, pad, and align your content within a given device or viewport.
Install Source Code
Typography
Display headings
Traditional heading elements are designed to work best in the meat of your page content. When you need a heading to stand out, consider using a display heading—a larger, slightly more opinionated heading style.
Install Display Heading Code
Install Lead Code
Font size
Quickly change the font-size
of text. While our heading classes (e.g., .h1
–.h6
) apply font-size
, font-weight
, and line-height
, these utilities only apply font-size
. Sizing for these utilities matches HTML’s heading elements, so as the number increases, their size decreases.
Install Source Code
Text alignment
Easily realign text to components with text alignment classes. For start, end, and center alignment, responsive classes are available that use the same viewport width breakpoints as the grid system.
Install Source Code
Colors
Colorize text with color utilities. If you want to colorize links, you can use the .link-*
helper classes which have :hover
and :focus
states.
Install Source Code
Background color
Similar to the contextual text color classes, set the background of an element to any contextual class. Background utilities do not set color
, so in some cases you’ll want to use .text-*
color utilities.
Install Source Code
Spacing
Fixed top
Install Source Code
Sizing
Width and height utilities are generated from the utility API in _utilities.scss
. Includes support for 25%
, 50%
, 75%
, 100%
, and auto
by default. Modify those values as you need to generate different utilities here.Install Source Code
While shadows on components are disabled by default in Bootstrap and can be enabled via
$enable-shadows
, you can also quickly add or remove a shadow with our box-shadow
utility classes. Includes support for .shadow-none
and three default sizes (which have associated variables to match).Use border utilities to quickly style the border and border-radius of an element. Great for images, buttons, or any other element
Documentation and examples for opt-in styling of tables (given their prevalent use in JavaScript plugins) with Bootstrap.
Media queries
Since Bootstrap is developed to be mobile first, we use a handful of media queries to create sensible breakpoints for our layouts and interfaces. These breakpoints are mostly based on minimum viewport widths and allow us to scale up elements as the viewport changes.
Install Source Code