Tuesday, April 3, 2012

Validating Forms without using JavaScript

http://www.cssjockey.com/web-design-tutorials/introduction-to-html5-forms-and-css3-pseudo-classes


CSS
input:required{ border-color:red; } input:optional{ border-color:whitesmoke; }

HTML 5
<input type="text" name="name" id="first-name" placeholder="enter you first name" required />

1 comment: