How Does HTML5 Deal With Forms?

New development HTML5 concerning forms. HTML version four used basic input types that could be arranged as needed. Now there are more input types under HTML5. Get a closer look at the new ways HTML5 deals with forms here in this quick article.

Back in the day, you had a “form” tag start off with the corresponding “input” tags creating their information in between. That is, before the form tag was closed, all the inputs were written out as needed, before the form ended. The browser knew to assign the inputs to the correct form simply because they were surrounded by the corresponding form tag. That changes somewhat in HTML5. Now there is a new “form” attribute that is inside the input tags. Now the browser will be able to assign the visitor’s input based on what is also inside the input tags. This helps a web page that has multiple forms to operate correctly.

Another new forms feature of HTML5 is the ability to simplify validation. In older versions of HTML, the webmaster used javascript to validate inputs as well as button clicks. If all parts of the form were required, and the user was not writing any information in some blanks, javascript would be used to show the user that information was in fact required. Now the web master has a new attribute called “required”. This is simply added to those input tags and text elements and no javascript is needed. That is, if a blank is needed, the web master simply adds the “required” attribute and the HTML5 compliant browser will know what to do. This is a lot easier than writing out lengths of javascript, when one word will do.

Also back in the day, HTML version four allowed the disabling of forms. Now HTML5 allows this with a twist. Grouping together elements into their respective places will still require using “fieldset” tags. Now a web master can add the “disabled” attribute and do that ( disable ) all the descendant controls when used.

Input elements in HTML5 also have a new list of new “type” attributes. They include the “tel” signage that deals with entering telephone numbers. This gives the blank a free-form feel, so that a person is not constrained to write their phone number in a certain format. The tel attribute can still be formatted using a pattern, but javascript must be used in the form.


Another new “type” attribute for input elements is “color”. This lets the user change color of elements if the web master has kept the element mutable. Unless otherwise specified, input elements are always mutable.


The new “range” attribute for HTML5 is created to simplify the entering of data. The value of the element does not have to be as strict and the user agent is allowed to provide a simpler interface than for a “number” state. There are more new attributes that enhance the forms under the new HTML5 standard. Get acquainted with them as the world dives into HTML5.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • Facebook
  • Mixx
  • Google Bookmarks
  • Blogplay