Recall & Review
beginner
What is a popover in Bootstrap?
A popover is a small overlay box that appears when a user clicks or hovers over an element. It shows extra information without leaving the page.
Click to reveal answer
beginner
How do you enable a popover on a button using Bootstrap?
Add
data-bs-toggle="popover" to the button and initialize popovers with JavaScript using var popover = new bootstrap.Popover(element).Click to reveal answer
beginner
Which attribute sets the popover content in Bootstrap?
Use
data-bs-content="Your content here" to set the text or HTML inside the popover.Click to reveal answer
intermediate
What are the four default positions for Bootstrap popovers?
Top, right, bottom, and left. You set them with
data-bs-placement attribute.Click to reveal answer
intermediate
How can you make a popover accessible for keyboard users?
Ensure the trigger element is focusable (like a button), use ARIA attributes like
aria-describedby, and allow keyboard to open/close the popover.Click to reveal answer
Which attribute activates a Bootstrap popover on an element?
✗ Incorrect
The attribute
data-bs-toggle="popover" tells Bootstrap to treat the element as a popover trigger.How do you specify the text shown inside a Bootstrap popover?
✗ Incorrect
The
data-bs-content attribute sets the content inside the popover.Which JavaScript method initializes a popover on an element?
✗ Incorrect
Use
new bootstrap.Popover(element) to activate popovers with JavaScript.What is the default trigger event for Bootstrap popovers?
✗ Incorrect
By default, popovers show when the user clicks the trigger element.
Which attribute controls the popover's position relative to the trigger?
✗ Incorrect
Use
data-bs-placement to set popover position: top, right, bottom, or left.Explain how to add a popover to a button in Bootstrap and make it accessible.
Think about HTML attributes, JavaScript initialization, and accessibility best practices.
You got /5 concepts.
Describe the different placement options for Bootstrap popovers and how to set them.
Placement is about where the popover box shows up around the element.
You got /3 concepts.