The HTML5 form Tag

The HTML5 <form> tag is utilized such that a form that can be answered by the user may be incorporated within the document. The HTML5 <form> tag is also frequently used along with other form elements like the following:

  • <input>
  • <textarea>
  • <button>
  • <select>
  • <option>
  • <optgroup>
  • <fieldset>
  • <datalist>
  • <output>
  • <label>

Using the HTML5 <form> tag is slightly different compared to its functions on HTML4.01. There are some new attributes that are used in HTML5 but are not present in HTML4.01. Aside from that some attributes from HTML4.01 are already considered as obsolete.

Attributes for the HTML5 <form> tag are the following:

Attribute

Value

Description

accept

MIME_type

Not supported in HTML5

accept-charset

character_set

Identifies character encodings

action

URL

Identifies location where to send the form-data upon form submission

autocompleteNew

on
off

Identifies autocomplete on or off

enctype

application/x-www-form-urlencoded
multipart/form-data
text/plain

Identifies how to encode data when submitting it to the server

method

get
post

Identifies the HTTP method

name

text

Identifies the name of a form

novalidateNew

novalidate

Identifies that form validation

target

_blank
_self
_parent
_top

Identifies place of the form response.

 

Featured pages

Overview

Learn about HTML5 architecture, design principles and patterns on HTML5 Overview Tutorial. Become …

Tags

Learn about HTML5 tags and discover a new list of HTML5 tags. Find out about HTML5 tags support by…

Welcome

 Learn HTML5 development techniques, tips and tricks on our website. Find out what is required…

Date Time Picker

HTML5 forms use date and time controls regularly. HTML5 date and time controls are used by booking …