<p class="text-primary">Hello, world!</p>
The text-primary class in Bootstrap applies the primary theme color, which by default is blue. So the text will appear blue in the browser.
The bg-danger class sets the background color to red in Bootstrap. The text-danger class changes text color, not background.
<div class="text-success bg-danger">Sample Text</div>. What will be the text and background colors?<div class="text-success bg-danger">Sample Text</div>
The text-success class sets the text color to green, while bg-danger sets the background color to red. They work independently.
The text-light class applies a light color to text, which contrasts well on a bg-dark background, improving readability and accessibility.
bg--primary (note the double dash)?<div class="bg--primary">Test</div>
Using bg--primary is not a valid Bootstrap class. The browser ignores it, so no background color is applied. No syntax or runtime errors occur.
