A tooltip is a small pop-up box that appears when a user hovers over or focuses on an element. It shows extra information about that element.
Click to reveal answer
beginner
How do you enable a tooltip in Bootstrap 5?
You add the attribute data-bs-toggle="tooltip" to an element and initialize tooltips with JavaScript using var tooltip = new bootstrap.Tooltip(element);.
Click to reveal answer
beginner
Which event triggers a Bootstrap tooltip by default?
The tooltip appears when the user hovers over or focuses on the element.
Click to reveal answer
intermediate
How can you change the position of a Bootstrap tooltip?
Use the data-bs-placement attribute with values like top, bottom, left, or right to position the tooltip.
Click to reveal answer
intermediate
Why is it important to include aria-label or aria-describedby with tooltips?
These attributes help screen readers understand the tooltip content, making your site accessible to users with disabilities.
Click to reveal answer
Which attribute activates a Bootstrap tooltip on an element?
Atooltip-enable="yes"
Bdata-toggle="popover"
Cdata-bs-toggle="tooltip"
Ddata-bs-tooltip="true"
✗ Incorrect
Bootstrap tooltips are activated by adding the attribute data-bs-toggle="tooltip" to the element.
What JavaScript code initializes all tooltips on a page in Bootstrap 5?