The <form> Element
Technical Summary
The form element treats form controls as one submission unit. It constructs an entry list from those controls and connects it to submission processing governed by action, method, and enctype.
The form element does not store data by itself. Its content model, form owner relationships, entry-list construction, validation, navigation, and server-side processing are separate boundaries to inspect.
Definition / Categories
| Item | Specification summary |
|---|---|
| Categories | Flow content and palpable content |
| Context | Where flow content is expected |
| Content model | Flow content, but with no descendant form elements |
| Tag omission | Neither the start tag nor the end tag is omissible |
Nested forms are not a conforming document structure. When DOM manipulation or HTML parsing is involved, inspect source structure separately from the constructed DOM and the resulting form owners.
Content attributes
| Attribute | Role | Boundary to inspect |
|---|---|---|
accept-charset | Character encoding used for submission | For the current HTML Standard, inspect its relationship to UTF-8 |
action | Destination URL for submission | If omitted, the form document's URL is used |
method | Submission method variant | get, post, or dialog; missing and invalid values default to GET |
enctype | Encoding for the entry list | The default is application/x-www-form-urlencoded; consider multipart/form-data for files |
autocomplete | Default autofill setting for controls in the form | Control-level settings, user preferences, and browser behavior also matter |
name | Name used by the document.forms API | Form identity and submitted field names are separate concepts |
novalidate | Boolean attribute that suppresses validation during submission | It selects a submission path; it does not make the data valid |
rel | Relationship for links created by the form | Inspect link behavior as well as submission behavior |
target | Navigable for the submission result | Inspect the browsing context and submission navigation together |
Form owner / Association
Form-associated elements can have a form owner: the form element with which they are associated. By default, a control is associated with its nearest ancestor form element.
A listed form-associated element can use the form attribute to explicitly associate with a particular form element in the same tree. This does not create nested forms; it separates control placement from ownership.
<form id="preferences" action="/save" method="post">
<button type="submit">Save</button>
</form>
<input form="preferences" name="theme" value="dark">
Here the input is not a descendant of the form, but form="preferences" identifies its form owner. The ID match, same tree, and listed-element conditions still apply.
Form submission attributes
Submission attributes can be specified on the form element and on a submit button. Submitter attributes such as formaction, formmethod, formenctype, formnovalidate, and formtarget provide per-route overrides.
<form action="/search" method="get">
<input name="q" type="search">
<button type="submit">Search normally</button>
<button type="submit" formaction="/export" formmethod="post">Export</button>
</form>
When one form exposes several submission routes, determine whether the form-level or submitter-level attribute supplies each value.
Submission model
user activation / requestSubmit()
↓
interactive constraint validation
↓
submit event (cancelable)
↓
construct the entry list
↓
encode it according to enctype
↓
submit and navigate according to action and method
This is an explanatory flow. The actual submission algorithm also branches on sandboxing, navigation, events, submitter state, entry-list construction, and encoding.
form.submit() bypasses interactive constraint validation and does not fire a submit event. form.requestSubmit() requests a normal-style submission that includes constraint validation and the submit event. Passing a submitter also brings that button's submission attributes and value into the process.
Entry list / Submittable controls
| Condition | What to inspect |
|---|---|
| Submittable | Whether the element, such as button, input, select, or textarea, can participate in the submission entry list |
name | Whether the control has a name; a control without one normally does not participate in regular submitted data |
disabled | A disabled control is excluded from the entry list |
| Checkedness | Check boxes and radio buttons have state-dependent participation conditions |
| Submitter | Among multiple submit buttons, the initiating submitter supplies the relevant button value and submission attributes |
Being visible in the interface is not the same as being included in the entry list. Element type, form owner, name, disabled state, checkedness, and submitter state must be evaluated together.
Constraint validation
Submission can involve constraint validation of eligible form controls. The conditions may include required, type, range, length, pattern, and custom validity.
novalidateor a submitter'sformnovalidatesuppresses validation during submission.- A
disabledcontrol is barred from constraint validation. checkValidity()checks constraints statically;reportValidity()performs an interactive check that informs the user when invalid controls exist.- Client-side validation is a user-experience feature, not a security mechanism. The server must validate received data too.
DOM interface
The form element is exposed through the HTMLFormElement interface. It provides form attributes, an elements collection, length, reset, validation, and submission-related APIs.
const form = document.querySelector('form');
form.elements;
form.checkValidity();
form.reportValidity();
form.reset();
form.requestSubmit();
API results also depend on form owners, control state, submitters, event listeners, and whether the document can navigate.
Fact / Evidence
Key facts are mapped to their conditions, review status, and evidence locations. Unresolved scope remains visible in the Coverage section below.
| Type | Fact | Condition / Scope | Status | Evidence |
|---|---|---|---|---|
| SPEC | The form element is Flow content and palpable content; its content model is Flow content without descendant forms. | When checking categories, context, content model, and tag omission. | Reviewed | HTML Standard: the form element |
| SPEC | action, method, enctype, and novalidate provide conditions for submission processing. | When evaluating form-level and corresponding submitter-level attributes. | Reviewed | HTML Standard: form submission attributes |
| SPEC | Form-associated elements have a form owner, and listed elements can use the form attribute for explicit association. | Nearest form ancestor, form attribute, same tree, and element category. | Reviewed | HTML Standard: association of controls and forms |
| SPEC | requestSubmit() requests submission with constraint validation and a submit event, while submit() bypasses them. | When comparing HTMLFormElement submission APIs. | Reviewed | HTML Standard: HTMLFormElement |
| SPEC | Form submission constructs an entry list and submits an encoding to the action using the selected method. | When evaluating name, disabled state, checkedness, submitter, and enctype. | Reviewed | HTML Standard: form submission |
Evidence
- HTML Standard: The form element — categories, content model, content attributes, and HTMLFormElement interface
- HTML Standard: Categories — form-associated, listed, submittable, and resettable classifications
- HTML Standard: Association of controls and forms — form owners and explicit association
- HTML Standard: Constraints — constraint validation, validation APIs, and the security boundary
- HTML Standard: Form submission — submission algorithm, entry lists, encoding, and submitters
- HTML Accessibility API Mappings: form — starting point for platform accessibility mapping
Implementation Evidence
Implementation observations are recorded separately from normative claims. Unrun items are not treated as reviewed.
Shared fixture / record: Inside <form id="evidence-form" method="get">, the fixture includes an input with no type, explicit for/id association, implicit association with an input inside a label, required, disabled, and submit plus type-omitted button controls. Environment: Chrome 152.0.0.0 (Windows NT 10.0) / checked 2026-09-12.
| Type | Reproducible scope | Record required | Status |
|---|---|---|---|
| IMPL | Form owner, form elements, method, and constraint-validation state | Checked with the shared fixture in Chrome 152.0.0 / Windows NT 10.0. method was get, the form exposed seven elements, the required input matched :invalid, and the submit button's form owner was evidence-form. | Reviewed (one Chrome) |
| WPT | Tests for form association, validation, requestSubmit, and submission | Mapped candidates: form-attribute-form-owner.html, form-checkvalidity.html, form-requestsubmit.html, and form-action-submission.html. On 2026-09-15 in Chrome 152.0.0.0 / Windows NT 10.0, all four selected files passed 18/18 on wpt.live. Unselected WPT coverage and other browsers remain open. | Partial (18/18 pass) |
| AAM | Browser AX observations of the form container, labelled fields, submit controls, and disabled state | In the same fixture's accessibility tree, a form container contained labelled fields, Save / Default submit buttons, and disabled field and button states. | Observed (Chrome AX) |
Use the WPT repository for test mapping and the HTML-AAM form mapping for accessibility criteria.
Coverage / Open Issues
- ReviewedCategories, content model, main content attributes, form owners, submission attributes, key entry-list conditions, and the HTMLFormElement overview
- ReviewedThe validation and submit-event boundary between
submit()andrequestSubmit() - OpenComplete entry-list branches, the formdata event, encodings, and special submitter conditions
- OpenMulti-browser implementation differences, exact WPT mapping, HTML-AAM, and assistive-technology observations
- OpenHistorical changes, server-side processing, compatibility, and Expert-gap Review
This is initial coverage. It does not claim that all facts about the form element have been verified or that every implementation produces the same result.
Related surface
For a first form, minimal examples, action and method, labels, and input checks, see the form element page in Yugien. For method="dialog" and dialog results, see the dialog element; for displayed calculation results that are not submitted, see the output element; for labelable association, see the label element; for multiline values and validation, see the textarea element; for control-side states, also see the input element and button element.