Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML input form attribute

HTML form attribute

HTML input Tag Reference HTML tag

Example

An input field outside the form (but still part of the form):

First name:

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Almost all major browsers support the form attribute, except Internet Explorer.


Definition and Usage

The form attribute specifies the one or more forms to which the element belongs.


Differences between HTML 4.01 and HTML5

The form attribute is new in HTML5.


Syntax

Attribute values

Value Description
form_id Specifies the A space-separated list of ids of the one or more forms to which the element belongs.

HTML input Tag Reference HTML tag