Bootstrap Background Color Classes

Notes:

Bootstrap Background Color Classes:

bg-primary : sets the background color with blue color
<p class="bg-primary">Some text</p>

bg-secondary : sets the background color with mid gray color
<p class="bg-secondary">Some text</p>

bg-success : sets the background color with green color
<p class="bg-success">Some text</p>

bg-warning : sets the background color with yellow color
<p class="bg-warning">Some text</p>

bg-info : sets the background color with cyan or fairy tale blue color
<p class="bg-info">Some text</p>

bg-danger : sets the background color with red color
<p class="bg-danger">Some text</p>

bg-dark : sets the background color with dark gray color
<p class="bg-dark">Some text</p>

bg-light : sets the background color with light gray color
<p class="bg-light">Some text</p>

bg-white : sets the background color with white color
<p class="bg-white">Some text</p>

CSS background-color property:
<p style="background-color:red;">Some text</p>
<p style="background-color:#ff0000;">Some text</p>
<p style="background-color:rgb(255,0,0);">Some text</p>
<p style="background-color:rgba(255,0,0,1);">Some text</p>

Interview Questions: