0
0
Bootsrapmarkup~20 mins

Carousel indicators in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Carousel Indicator Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1:30remaining
What is the role of carousel indicators in Bootstrap?
In a Bootstrap carousel, what is the main purpose of the indicators shown below the slides?
AThey add captions to each slide for accessibility.
BThey automatically change the slide speed based on user interaction.
CThey show which slide is currently active and allow users to jump to any slide.
DThey control the carousel's autoplay pause and resume functions.
Attempts:
2 left
💡 Hint
Think about what the small dots below a carousel do when clicked.
📝 Syntax
intermediate
2:00remaining
Identify the correct Bootstrap carousel indicator syntax
Which of the following code snippets correctly creates carousel indicators for a Bootstrap carousel with 3 slides?
A
<ul class="carousel-indicators">
  <li data-target="#carouselExample" data-slide-to="0" class="active"></li>
  <li data-target="#carouselExample" data-slide-to="1"></li>
  <li data-target="#carouselExample" data-slide-to="2"></li>
</ul>
B
<div class="carousel-indicators">
  <button type="button" data-bs-target="#carouselExample" data-bs-slide-to="0" class="active" aria-current="true" aria-label="Slide 1"></button>
  <button type="button" data-bs-target="#carouselExample" data-bs-slide-to="1" aria-label="Slide 2"></button>
  <button type="button" data-bs-target="#carouselExample" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
C
<div class="carousel-indicators">
  <button data-bs-target="#carouselExample" data-bs-slide-to="0" class="active"></button>
  <button data-bs-target="#carouselExample" data-bs-slide-to="1"></button>
  <button data-bs-target="#carouselExample" data-bs-slide-to="2"></button>
</div>
D
<div class="carousel-indicators">
  <button type="button" data-bs-target="#carouselExample" data-bs-slide-to="0" aria-label="Slide 1"></button>
  <button type="button" data-bs-target="#carouselExample" data-bs-slide-to="1" aria-label="Slide 2"></button>
  <button type="button" data-bs-target="#carouselExample" data-bs-slide-to="2" aria-label="Slide 3"></button>
</div>
Attempts:
2 left
💡 Hint
Bootstrap 5 uses
rendering
advanced
1:30remaining
What will be the visual effect of missing the 'active' class on carousel indicators?
If none of the carousel indicator buttons have the 'active' class, what will the user see when the carousel loads?
AThe carousel will not function and will throw a JavaScript error.
BThe first indicator will be highlighted by default even without the 'active' class.
CAll indicators will be highlighted, confusing the user.
DNo indicator will appear highlighted, so users won't know which slide is active.
Attempts:
2 left
💡 Hint
Think about how CSS highlights the active indicator.
selector
advanced
1:30remaining
Which CSS selector targets only the active carousel indicator button?
Given Bootstrap carousel indicators, which CSS selector correctly styles only the active indicator button?
A.carousel-indicators button.active
B.carousel-indicators > button
C.carousel-indicators button[aria-current="true"]
D.carousel-indicators button:focus
Attempts:
2 left
💡 Hint
The active indicator has a specific class assigned to it.
accessibility
expert
2:00remaining
Which attribute is essential for screen readers on carousel indicators?
For carousel indicators to be accessible, which attribute must each indicator button include to describe its purpose to screen readers?
Aaria-label
Btabindex="-1"
Crole="presentation"
Daria-hidden
Attempts:
2 left
💡 Hint
This attribute provides a text description for screen readers.