HTML - Form element

> (World Wide) Web - (W3|WWW) > HyperText markup Language (HTML)

1 - About

The form element represents a user-submittable form.

When parsed as HTML, a form element's start tag will imply a p element's end tag just before.

Forms element contains input element (Checkbox, …).


3 - State

Form elements such as <input>, <textarea>, and <select> typically maintain their own state (attribute value) and update it based on user input.

4 - Data Control

  • Client Side: JavaScript function
  • Server Side: The server gets the data and return the result (slow as you need two http call).

5 - Example

First name: <input type="text" name="firstname" value="">
Last name:  <input type="text" name="lastname" value="">

6 - DOM Accessors

The document attribute document.forms return an HTMLCollection of the form elements in the Document.

web/html/form.txt · Last modified: 2019/02/09 11:41 by gerardnico