HTML Next · independent proposal
HTML Forms
A form is an author-owned submission scope: it gathers named controls, validates them, and turns a deliberate submit into a request or dialog action. This proposal extends that durable model with the HTTP methods applications use and an explicit hierarchy for composing focused submissions into a larger workflow.
Unofficial Editor's Draft · Stage 0The proposal
HTML forms already combine four useful platform concepts: control ownership, constraint validation, an explicit commit event, and request construction. This proposal develops that model in three focused areas:
- Expanded request methods. Forms accept
query, put, patch, and delete alongside get, post, and the non-network dialog action. - Submitter-selected operations. One set of controls can serve multiple endpoints and methods through the existing
formaction and formmethod attributes. - Composable submission scopes. An outer form may opt into containing focused inner forms. Each submitter selects one scope, while the outer scope represents the complete workflow.
Open for reviewReview is requested on the method vocabulary, QUERY navigation behavior, the composable opt-in, aggregate validation and entry-list construction, implicit submission, reset behavior, accessibility exposure, and the parser compatibility boundary.
Expanded request methods
The method attribute is an ASCII-case-insensitive enumerated attribute with lowercase canonical keywords. HTML source writes method="patch", while request construction maps the selected keyword to the uppercase HTTP method. patch and PATCH both produce HTTP PATCH; the authored spelling is never passed through as the wire method.
<form action="/api/posts/42" method="patch">
<label>Title <input name="title" required></label>
<button>Save draft</button>
<!-- One control set can expose more than one operation. -->
<button formaction="/api/posts/42/publish" formmethod="post">
Publish
</button>
</form>
| Keyword | Request semantics | Form data |
|---|
get | safe, idempotent retrieval | encoded into the action URL |
query | safe, idempotent retrieval with request content | encoded as the request body with an explicit media type |
post | resource-specific processing | encoded as the request body |
put | replace resource state | encoded as the request body |
patch | apply a partial modification | encoded as the request body |
delete | remove the selected resource | encoded into the action URL, following the current WHATWG proposal |
dialog | close the owning dialog | no network request |
The existing submitter overrides remain the operation-selection mechanism: formaction, formmethod, formenctype, formtarget, and formnovalidate let one button choose a different endpoint or operation while reusing the form's controls. The new network keywords apply to formmethod as well as method.
Lowercase authoring, uppercase HTTPThe supported network keywords are get, query, post, put, patch, and delete. Parsing is ASCII-case-insensitive; the corresponding HTTP methods are GET, QUERY, POST, PUT, PATCH, and DELETE. A missing or invalid value retains HTML's existing get default. dialog remains a form action rather than an HTTP method.
QUERY forms
RFC 10008 defines QUERY for safe, idempotent requests whose query is too structured or large for a URL. Advanced search, report builders, map queries, and similar read operations can therefore carry form data as request content without adopting POST semantics.
<form action="/api/reports" method="query"
enctype="application/x-www-form-urlencoded">
<label>Regions <select name="region" multiple>…</select></label>
<label>From <input name="from" type="date"></label>
<label>To <input name="to" type="date"></label>
<button>Run report</button>
</form>
A QUERY submission constructs the successful-controls entry list, encodes it using the selected enctype, and places it in the request content. The request carries the matching Content-Type. History, reload, and retry behavior follow a safe, idempotent retrieval.
QUERY requires end-to-end supportHTTP QUERY was standardized in June 2026. HTML support is proposed in WHATWG HTML issue #12594 and is not yet part of the HTML Living Standard. Servers, proxies, caches, and security products also need to recognize the method. Implementations must surface an unsupported-method failure instead of silently changing QUERY into GET.
Composable submission scopes
A complex workflow may need both a complete submission and smaller submissions within it: a shipping quote inside checkout, an address lookup inside account setup, or row-level actions inside a larger editor. A composable outer form declares one hierarchy containing those focused scopes.
<form composable action="/checkout" method="post">
<label>Postal code <input name="postalCode" required></label>
<form action="/shipping/quote" method="query">
<label>Delivery speed <select name="speed">…</select></label>
<button>Update shipping quote</button>
</form>
<button>Place order</button>
</form>
The candidate ownership and submission rules are:
- A control's nearest ancestor
<form> remains its form owner. An explicit form="id" association overrides ancestry, as it does today. - Activating a submitter submits exactly its form owner. An inner submit validates and collects that inner scope.
- Submitting the outer form collects the successful controls of its descendant form scopes in tree order. It performs one validation pass, one
formdata construction, and one request to the outer action. requestSubmit(submitter), implicit Enter-key submission, reset, form.elements, and validity resolve against the selected scope. Operations on the composable outer scope include its composed descendants; operations on an inner scope remain local.- The
submit event is dispatched for the selected form and bubbles normally through the DOM. Bubbling does not initiate another submission.
The composable opt-in belongs to the outer form because that author controls the aggregate request. Inner forms remain ordinary, focused submission scopes with their own action, method, validation, and submitters.
Parser compatibility requires incubationThe HTML parser currently keeps one form element pointer and ignores a nested <form> start tag while another form is open. Changing every nested form would reinterpret existing malformed pages. The composable marker provides an explicit compatibility boundary: only an opted-in outer form admits nested form tokens, using a stack of active form scopes. Native support requires parser, submission, history, accessibility, and web-compat work with browser tests and implementation interest.
Relationship to current platform work
The proposal brings two active platform efforts together and adds a focused composition model:
- PUT, PATCH, and DELETE: WHATWG HTML PR #11347 specifies the form and navigation changes, paired with a Fetch change for CORS-preflighted navigation requests.
- QUERY: RFC 10008 standardizes the HTTP method; WHATWG HTML issue #12594 proposes adding it to
method and formmethod. - Composable scopes: the ownership hierarchy above is the new part of this proposal. Its syntax and aggregate submission semantics need focused review and web-platform incubation.
Element reference
<form composable> an explicit hierarchy of native submission scopes
- Methods
get, query, post, put, patch, delete, and form action dialog; parsed ASCII-case-insensitively.- Ownership
- Nearest form by default; explicit
form association overrides ancestry. - Inner submit
- Validates, collects, and submits the selected inner scope.
- Outer submit
- Collects its own and composed descendant scopes into one entry list and submits once.
- Stage
- Stage 0 · incubation