CSS provides us with a handful of pseudo classes that are specific to HTML5 forms. They allow us to create forms that are easier to fill out by highlighting fields that are required, optional, valid, invalid, etc. Pseudo Classes for Forms The following pseudo classes are all related to form elements with examples on how
With HTML5 we have been given new input types (email, tel, url, number, etc.) and built in browser validation to validate them. This is great but you may want to disable this validation if you want to test your server side validation, use custom validation, or something else. This is where the novalidate property comes
Have you ever wanted to automatically place the cursor in a field when the page is rendered? I know I have. This sort of thing used to require more than just HTML to accomplish but with now HTML5 it’s a breeze. Here’s how you can autofocus fields with HTML5 form attributes. Yep, it’s that easy.