The <form> element

A web page's <form> element is used to create a form on the page, collect user data and send that data to an application for processing. For example, when you shop online, you fill out a form indicating the product and the number of items and then submit it for processing. The DOM HTMLFormElement Interface provides the properties and methods. Forms must have a unique name Forms also must contain a method which says how the data will be sent to the application. Examples show how to use the post and get methods to send user data to an application.

Technical summary

Content categories Flow content, palpable content
Permitted content Flow content, but not containing <form> elements
Tag omission None, both the starting and ending tag are mandatory.
Permitted parents Any element that accepts flow content
Implicit ARIA role form if the form has an accessible name, otherwise no corresponding role
Permitted ARIA roles search, none or presentation
DOM interface HTMLFormElement