The HTML form element

The HTML form element

Forms are more advanced than ever and modern technology does not require the HTML <form> element for your form to be functional. However it's important to add the semantically correct <form> container element to all your forms. One of the reasons is that assistive devices for persons with disabilities use this element to correctly display the form depending on the device's configuration.

The autocomplete functionality of such forms will not always work as expected, hereby it's advised to add a <form> HTML tag around all your fields.

Adding a <form> element around all your fields


<form name="yourFormPuropse" id="yourFormPuropse" onsubmit="if (arguments && arguments[0] instanceof Event) { arguments[0].preventDefault(); }; return false;">    <!-- All your form content: text, images, fields and more //--> </form>

Important: also make sure all your form fields have a name and/or id attribute set, more information about this requirement can be found here.