---
title: "How many types of text-colors classes are there in Bootstrap?"  
description: "How many types of text-colors classes are there in Bootstrap?"  
author: "Ethan Karla"  
published: 2021-07-28  
canonical: https://answers.mindstick.com/qa/93851/how-many-types-of-text-colors-classes-are-there-in-bootstrap  
category: "web application"  
tags: ["web servers", "web application development", "web development"]  
reading_time: 1 minute  

---

# How many types of text-colors classes are there in Bootstrap?

How many types of [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions)-[colors](https://www.mindstick.com/blog/300985/what-your-clothes-reveal-about-you-psychologically) classes are there in [Bootstrap](https://www.mindstick.com/articles/43948/top-free-resources-for-learning-and-perfecting-bootstrap-programming)?

## Answers

### Answer by Ravi Vishwakarma

in bootstrap, there are many types of color classes for styling the elements in the HTML page.

The classes for text colors are:

1. .text-primary
2. .text-secondary
3. .text-success
4. .text-danger
5. .text-warning
6. .text-info
7. .text-light
8. .text-dark
9. .text-muted
10. .text-white

Example

```
<!DOCTYPE html>
<html lang='en'>
<head>
  <title>Color Example</title>
  <meta charset='utf-8'>
  <meta name='viewport' content='width=device-width, initial-scale=1'>
  <link rel='stylesheet' href='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css'>
  <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js'></script>
  <script src='https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js'></script>
  <script src='https://maxcdn.bootstrapcdn.com/bootstrap/4.5.2/js/bootstrap.min.js'></script>
</head>
<body>
<div class='container'>
 <p class='text-primary'>.text-primary</p>
<p class='text-secondary'>.text-secondary</p>
<p class='text-success'>.text-success</p>
<p class='text-danger'>.text-danger</p>
<p class='text-warning'>.text-warning</p>
<p class='text-info'>.text-info</p>
<p class='text-light bg-dark'>.text-light</p>
<p class='text-dark'>.text-dark</p>
<p class='text-muted'>.text-muted</p>
<p class='text-white bg-dark'>.text-white</p>
</div>
</body>
</html>
```

Output

![How many types of text-colors classes are there in Bootstrap?](https://answers.mindstick.com/questionanswer/0b4bdfcf-3592-4e17-b02c-52c1644fdd6c/images/6e66432e-05cc-4e4f-9559-3a27bd04254b.png)\


---

Original Source: https://answers.mindstick.com/qa/93851/how-many-types-of-text-colors-classes-are-there-in-bootstrap

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
