Adding style to hover only when there is href

Today I needed to find a way to style <a> tags that didn’t have href inside them.
You can do that with CSS3 as follows:

a:hover             {background: yellow;}
a:hover:not([href]) {background: none;}

Examples below:

Link One     Link Two     Link Three

  1. No comments yet.

  1. No trackbacks yet.