Create a tooltip that appears when hovering over a button.
MediumProblem Statement
Create a tooltip that appears when hovering over a button.
Sample Output
A tooltip appears above the button when hovered.
Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
<!DOCTYPE html>
<html>
<head>
<style>
/* Add CSS here to style the tooltip */
</style>
</head>
<body>
<div class="tooltip">
<button>Hover Me</button> <span class="tooltip-text">Tooltip text</span>
</div>
</body>
</html>
Document
To view the HTML changes, please type the code within the editor