Source Code:
(back to article)
Submit
Result:
Report an issue
<div> <p style="font-weight: bold;">Hover your mouse on the icon!</p> <label for="password">Password:</label> <input type="password" id="password"> <span id="helpIcon" style="cursor: help;">ⓘ</span> <div id="helpText" style="display:none; margin-top: 10px;">Use 8 or more characters with a mix of letters, numbers & symbols.</div> </div> <script> document.getElementById('helpIcon').addEventListener('mouseover', function() { document.getElementById('helpText').style.display = 'block'; }); document.getElementById('helpIcon').addEventListener('mouseout', function() { document.getElementById('helpText').style.display = 'none'; }); </script>