IT. Expert System.



Tag Description

The form tag is used to create an HTML form for user input. Forms are used to pass user-data to a server.

This tag has the form:

<form action="URL" enctype="{ application/x-www-form-urlencoded | multipart/form-data | text/plain }" method="{ get | post }">

HTML5 and HTML4.01 Differences

HTML5 has defined new attributes, and some HTML4.01 attributes are not supported in HTML5.

HTML5   = New for HTML5


Attribute Value Description
accept MIME_type Specifies the types of files that can be submitted through a file upload
HTML4: supported in html4.01
HTML5: not supported in html5
accept-charset charset Specifies the character sets the server can handle for form-data
action URL (required) Specifies where to send the form-data when a form is submitted
autocompleteHTML5 on
Specifies whether a form should have autocomplete on or off.

If "on" browsers can store the form's input values, to auto-fill the form if the user returns to the page.
If "off" browsers should not store this information
enctype application/x-www-form-urlencoded
Specifies how form-data should be encoded before sending it to a server.

The default is application/x-www-form-urlencoded
method get
Specifies the HTTP method to use when sending form-data
name text Specifies the name for a form
novalidateHTML5 novalidate If present the form should not be validated when submitted
target _blank
Specifies where to open the target URL.
  • _blank - the target URL will open in a new window
  • _self - the target URL will open in the same frame as it was clicked
  • _parent - the target URL will open in the parent frameset
  • _top - the target URL will open in the full body of the window

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.


The following example shows the basic use of this tag:

<form action="form_action.asp" method="get">
  First name:
  <input type="text" name="fname" />
  Last name:
  <input type="text" name="lname" />
  <input type="submit" value="Submit" />

This produces the following result:

First name:
Last name:

Browser Support

Chrome Firefox IE Safari Opera

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 2
Empty Tag: No


Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)





Java Script








Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 108 / 158660040. Delta: 0.03163 с