Source Code: (back to article)
<div>
<p id="hoverText">Hover over me to highlight.</p>
</div>
<script>
document.getElementById('hoverText').addEventListener('mouseover', function() {
this.style.color = 'green';
});
document.getElementById('hoverText').addEventListener('mouseout', function() {
this.style.color = 'black';
});
</script>