background preloader

Examples

Facebook Twitter

Accelerating science. DZSlides. Obama for America — 2012. HTML5 Reset :: A simple set of templates for any project. HTML5 code snippets to take your website to the next level. Url and email input types HTML5 introduced new input types url and email are one of those.

They allow you to write a more semantically correct code and make the form completion easier on mobile devices, by displaying special buttons (like the @ or .com buttons) depending on the input type. Here is the url attribute in action: And the email attribute as well. Please also pay attention to the pattern attribute as I will explain it below. Source: Regexp patterns for form validation Before HTML5, when you used a form on your website, you had to use JavaScript to create a front-side validation. The following snippet is for validating email addresses: This one is for strong passwords: And this one is for validating phone numbers: Source: Context menus with HTML5 Source/Demo: HTML5 video, with Flash fallback Autocompletion with HTML5 datalists.