<form>

Forms

Represents a section of interactive controls for submitting information to a server. The foundation of user input on the web.

Common Attributes

actionmethodenctypetargetautocompletenovalidate

Example

<form action="/submit" method="POST">
  <input type="text" name="name">
  <button type="submit">Submit</button>
</form>

About the <form> Element

The <form> HTML element belongs to the Forms category of HTML elements. Represents a section of interactive controls for submitting information to a server. The foundation of user input on the web. Understanding when and how to use this element is essential for building well-structured, accessible, and SEO-friendly web pages.

The <form> element requires both an opening <form> and closing </form> tag. Content placed between these tags becomes the element's children. This element is part of the current HTML Living Standard and is supported in all modern browsers including Chrome, Firefox, Safari, and Edge.

Proper use of semantic HTML elements like <form> improves document structure, helps screen readers interpret content correctly, and provides signals to search engines about the purpose of different sections of your page. This leads to better accessibility scores, improved SEO rankings, and more maintainable code.

Related Elements