bootstrap how to make color text code example

Example 1: bootstrap 4 text color

<p class="text-primary">Text with primary color</p>
<p class="text-secondary">Text with secondary color</p>
<p class="text-success">Text with success color</p>
<p class="text-danger">Text with danger color</p>
<p class="text-warning">Text with warning color</p>
<p class="text-info">Text with info color</p>
<p class="text-light bg-dark">Text with light color</p>
<p class="text-dark">Text with dark color</p>
<p class="text-muted">Text with muted color</p>
<p class="text-white bg-dark">Text with white color</p>

Example 2: bootstrap background

<div class="p-3 mb-2 bg-primary text-white">.bg-primary</div>
<div class="p-3 mb-2 bg-secondary text-white">.bg-secondary</div>
<div class="p-3 mb-2 bg-success text-white">.bg-success</div>
<div class="p-3 mb-2 bg-danger text-white">.bg-danger</div>
<div class="p-3 mb-2 bg-warning text-dark">.bg-warning</div>
<div class="p-3 mb-2 bg-info text-white">.bg-info</div>
<div class="p-3 mb-2 bg-light text-dark">.bg-light</div>
<div class="p-3 mb-2 bg-dark text-white">.bg-dark</div>
<div class="p-3 mb-2 bg-white text-dark">.bg-white</div>

Tags:

Html Example