Look-Ma-No-Hands HTML Tricks : Mouse-over Text-Highlight

Updated on : 02-02-2002
No Java, no plugins, no nothing. Just a simple and stunningly useless HTML trick. It may even not always work depending on the kind/version of the browser you use. But what do I care?!

Mouse-over Text-Highlight

Mouse-over Text-Highlight

Mouse-over Text-Highlight

You can pick any color you like.

The sentence above is highlighted by the <span> tag. Don't ask me what "span tag" is, though. I just stole it somewhere. Anyway here's how it's written.


<span onmouseout="this.style.backgroundColor='transparent';" onmouseover="this.style.backgroundColor='pink';">
You can pick any color you like.
</span>