A demonstration of the :invalid selector.

Try typing a legal e-mail address, to see the styling disappear.

Note: The :invalid selector is not supported in Internet Explorer 9 and earlier versions.