HTML5 makes developing forms quicker. HTML5 web forms have introduced new form elements, input types, attributes, and other features that allow us to remove many lines of Javascript.

There are some addition of two HTTP types of form action (update and delete) to go with the current get and post.

A number of elements that were previously required to be within a form element (<button>, <fieldset>, <input>, <label>, <select>, <textarea>, plus <object> and the new elements like <keygen>, <meter>, <output>, and <progress>) can be anywhere on the page and associated with a form using a form attribute pointing at the id of its form owner.

Consider this example:
<form id=foo>
<input type="text"> ...
<textarea form=foo></textarea>

The <input> is owned by the form foo, as it is contained within it and it does not have a form attribute overriding it.

The <textarea> is outside the form, but is still owned by it, as itsform attribute points to the id of its form.
Related Tutorial
Follow Us #