Home » Internet » Web Designing » How to create highly interactive forms with HTML 5

How to create highly interactive forms with HTML 5

HTML 5 has introduced great features to make your web forms more interactive and error proof. Many things that previously required ample amounts of JavaScript or even server side scripting can be achieved simply with a few HTML 5 attributes.

Take for instance form fields requiring you to add URLs and email addresses in a valid format. Previously you needed intricate JavaScripts to go through the field values and evaluate the entered strings. To make sure that a person has entered a URL and nothing else, you just need to define a form input field like this:

<input type=”url” name=”your_url” id=”your_url” />

and that’s it. The rest of the validation is taken care of by HTML 5.

Similarly, it also handles regular expressions to make sure that, for example, no numbers are entered in the name field. Read more on how to create great web forms with HTML 5.