Name
form
Synopsis
<form> . . . </form>
Indicates an interactive form that contains controls for collecting user input as well as other page content. There may be more than one form in a document, but forms may not be nested inside one another, and it is important that they do not overlap.
Usage
- Categories:
Flow content, palpable content
- Permitted contexts:
Where flow content is expected
- Permitted content:
Flow content, but it may not contain other
formelements- Start/end tags:
Required/Required
Attributes
HTML5 Global Attributes
accept-charset="charset list"Specifies the list of character encodings for input data that must be accepted by the server to process the current form. The value is a space- and/or comma-delimited list of ISO character set names. The default value is
unknown. This attribute is not widely supported.action="URL"Required. Specifies the URL of the application that will process the form. The default is the current URL.
autocomplete="on|off"Not in HTML 4.01. Allows the user agent (browser) to fill in a field automatically (
on) or requires the user to enter the information every time (off).enctype="content type"Specifies how the values for the form controls are encoded when they are submitted to the server when the method is
post. The default is the Internet Media Type (application/x-www-form-urlencoded). The valuemultipart/form-datashould be used in combination with thefileinput element. The newtext/plainvalue sets the MIME type to text/plain.method="GET|POST"Specifies ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access