Recall & Review
beginner
What is a
list group in Bootstrap?A
list group is a flexible and powerful component for displaying a series of content. It is often used to show lists of items with consistent styling and spacing.Click to reveal answer
beginner
How do you add a badge to a list group item in Bootstrap?
You add a
<span> element with the class badge inside the list group item. The badge usually shows a count or label aligned to the right.Click to reveal answer
intermediate
What Bootstrap class aligns badges to the right inside list group items?Flex utilities like
d-flex justify-content-between align-items-center on the list-group-item align badges to the right. The badge is styled with classes like badge bg-primary rounded-pill.Click to reveal answer
beginner
Why use badges in list groups?
Badges provide extra information like counts, statuses, or labels next to list items. They help users quickly see important details without extra text.
Click to reveal answer
beginner
Show the basic HTML structure for a Bootstrap list group with badges.
Use
<ul class='list-group'> with <li class='list-group-item d-flex justify-content-between align-items-center'>. Inside each li, add a <span class='badge bg-primary rounded-pill'> for the badge.Click to reveal answer
Which Bootstrap class is used to create a list group?
✗ Incorrect
The class
list-group creates a list group container in Bootstrap.What class combination styles a badge with a pill shape and primary color?
✗ Incorrect
Use
badge bg-primary rounded-pill to get a blue pill-shaped badge.How do you align a badge to the right inside a list group item?
✗ Incorrect
Bootstrap uses flexbox with
d-flex justify-content-between on the list item to space content and badge apart.Which HTML element is typically used for badges inside list groups?
✗ Incorrect
Badges are usually
<span> elements for inline styling.What is the main purpose of badges in list groups?
✗ Incorrect
Badges highlight important info such as numbers or statuses next to list items.
Explain how to create a Bootstrap list group with badges that show counts on the right side.
Think about using flexbox classes to space the badge and item text.
You got /5 concepts.
Describe why badges are useful in list groups and how they improve user experience.
Consider how badges add meaning without extra words.
You got /4 concepts.