Complete the code to add a Bootstrap class that ensures good text contrast on a dark background.
<button class="btn btn-primary [1]">Click me</button>
text-dark on a dark background makes text hard to read.Using text-light makes the text color light, which contrasts well on a dark background like btn-primary.
Complete the code to add a Bootstrap class that ensures good text contrast on a light background.
<p class="bg-light [1]">This is readable text.</p>
text-light on a light background makes text hard to see.border.Using text-dark on a light background like bg-light ensures the text is easy to read.
Fix the error in the code to ensure the text has enough contrast on a dark background.
<div class="bg-dark [1]">Important message</div>
text-dark on a dark background.text-muted which is too faint.The text-light class provides light-colored text that contrasts well on a dark background like bg-dark.
Fill both blanks to create a Bootstrap alert with good color contrast for a warning message.
<div class="alert [1] [2]" role="alert">Warning! Check this out.</div>
text-light on yellow background makes text hard to read.alert-primary.The alert-warning class gives a yellow background, so text-dark ensures the text is readable with good contrast.
Fill all three blanks to create a Bootstrap card with a dark header and readable text.
<div class="card"> <div class="card-header [1] [2]">Header</div> <div class="card-body [3]">Content goes here.</div> </div>
text-dark on dark backgrounds.The header uses bg-dark for dark background and text-light for readable text. The body uses text-dark on default light background for good contrast.
