In this tutorial you will learn about the Bootstrap helper/utility classes.
Color Classes
You can use the contextual color classes to emphasize the text and convey meaning through color. Here’s the complete list of available contextual color classes.
| Class | Description | Test |
|---|---|---|
.text-primary | Apply blue color (#007bff) on text. | Example |
.text-secondary | Apply grey color (#6c757d) on text. | Example |
.text-success | Apply green color (#28a745) on text. | Example |
.text-danger | Apply red color (#dc3545) on text. | Example |
.text-warning | Apply yellow color (#ffc107) on text. | Example |
.text-info | Apply teal color (#17a2b8) on text. | Example |
.text-light | Apply very light grey color (#f8f9fa) on text. | Example |
.text-dark | Apply dark grey color (#343a40) on text. | Example |
.text-body | Apply Bootstrap’s default body text color (#212529) on text. | Example |
.text-muted | Apply light grey color (#6c757d) on text. | Example |
.text-white | Apply white color (#fff) on text. | Example |
.text-black-50 | Apply 50% transparent black color (rgba(0,0,0,.5)) on text. | Example |
.text-white-50 | Apply 50% transparent white color (rgba(255,255,255,.5)) on text. | Example |