Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to add a Bootstrap icon inside the button.
Bootsrap
<button type="button" class="btn btn-primary"> <i class="bi bi-[1]"></i> Click me </button>
Attempts:
3 left
💡 Hint
Common Mistakes
Using icon names that do not exist in Bootstrap Icons.
Forgetting the "bi" prefix in the class.
✗ Incorrect
The class "bi bi-star" adds a star icon from Bootstrap Icons inside the button.
2fill in blank
mediumComplete the code to add a search icon inside the input group.
Bootsrap
<div class="input-group"> <span class="input-group-text" id="basic-addon1"> <i class="bi bi-[1]"></i> </span> <input type="text" class="form-control" placeholder="Search" aria-label="Search" aria-describedby="basic-addon1"> </div>
Attempts:
3 left
💡 Hint
Common Mistakes
Using unrelated icons that confuse users about the input purpose.
Missing the "bi" prefix in the icon class.
✗ Incorrect
The "bi bi-search" class adds a magnifying glass icon, commonly used for search inputs.
3fill in blank
hardFix the error in the button icon class to correctly show a trash icon.
Bootsrap
<button type="button" class="btn btn-danger"> <i class="bi [1]"></i> Delete </button>
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting the "bi-" prefix causes the icon not to display.
Using incomplete or incorrect icon class names.
✗ Incorrect
The correct class for the trash icon is "bi-trash-fill" with the "bi" prefix included in the class name for a filled trash icon.
4fill in blank
hardFill both blanks to add a calendar icon inside a button and set the button type.
Bootsrap
<button type="[1]" class="btn btn-outline-secondary"> <i class="bi bi-[2]"></i> Date </button>
Attempts:
3 left
💡 Hint
Common Mistakes
Using "submit" type when not submitting a form.
Choosing an icon name that is not a calendar.
✗ Incorrect
The button type should be "button" for a normal clickable button, and "bi bi-calendar" adds a calendar icon.
5fill in blank
hardFill all three blanks to create an input group with a lock icon and a password input.
Bootsrap
<div class="input-group mb-3"> <span class="input-group-text" id="basic-addon2"> <i class="bi bi-[1]"></i> </span> <input type="[2]" class="form-control" placeholder="Password" aria-label="Password" aria-describedby="basic-addon2" [3]> </div>
Attempts:
3 left
💡 Hint
Common Mistakes
Using input type "text" instead of "password" for passwords.
Forgetting to add the "required" attribute if the field must be filled.
✗ Incorrect
The icon is "lock", the input type for passwords is "password", and adding "required" makes the input mandatory.
