You'd need to look at using Javascript here because a basic page can't do this by itself. You can do this by leveraging the
data-
attributes. Something akin to this:
JSFiddle[
^]
If you're using a library like jQuery then the actual JS logic would be much simpler, and would require minimal effort.