<input type="email" value="w3tr"/>
input:invalid { 
    background: blue;
    color:red;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.