Challenge - 5 Problems
Bootstrap Form Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
What is the purpose of the
form-control class in Bootstrap?Bootstrap uses the
form-control class on input elements. What does this class do?Attempts:
2 left
💡 Hint
Think about how Bootstrap helps inputs look uniform and easy to use.
✗ Incorrect
The
form-control class in Bootstrap applies consistent styling like width, padding, and border to input elements, making forms look clean and easy to interact with.📝 Syntax
intermediate2:00remaining
Which code correctly creates a Bootstrap text input with label?
Select the option that correctly uses Bootstrap classes to create a labeled text input.
Attempts:
2 left
💡 Hint
Remember the label's for attribute should match the input's id, and the input needs the correct Bootstrap class.
✗ Incorrect
Option A correctly pairs the label's for attribute with the input's id and uses the Bootstrap class
form-control to style the input.❓ rendering
advanced2:00remaining
What will the following Bootstrap form control look like in the browser?
Given this code, what visual result will you see in a modern browser?
Bootsrap
<input type="text" class="form-control" placeholder="Enter your name" aria-label="Name input">
Attempts:
2 left
💡 Hint
Think about how Bootstrap styles inputs and what placeholder text does.
✗ Incorrect
The
form-control class makes the input wide with padding and border. The placeholder attribute shows grey text inside the box until the user types.❓ selector
advanced2:00remaining
Which CSS selector targets all Bootstrap form controls inside a form with class
user-form?Choose the correct CSS selector to style all inputs with class
form-control inside a form having class user-form.Attempts:
2 left
💡 Hint
Remember the order: parent element, then descendant with class.
✗ Incorrect
Option C correctly selects any element with class
form-control inside a form element with class user-form.❓ accessibility
expert2:00remaining
Which attribute improves accessibility for screen readers on Bootstrap form controls?
You want to make sure screen readers understand the purpose of your input fields. Which attribute is best to add to a Bootstrap input element?
Attempts:
2 left
💡 Hint
This attribute provides a text description specifically for assistive technologies.
✗ Incorrect
The
aria-label attribute gives screen readers a clear label for the input, improving accessibility. Placeholder text is not a reliable label for screen readers.