Get to know Forms
Description
Forms are the HTML mechanism for gathering input from the user.
To create a basic form, you need three elements:
the form
, input
, and button
elements.
Example
The following table shows an HTML document that contains a simple form.
<!DOCTYPE HTML>
<html>
<body>
<form method="post" action="http://example.com/form">
<input name="name" />
<button>Submit Vote</button>
</form><!-- w w w . j a v a 2 s.c o m-->
</body>
</html>
Form
The form element,
with local attributes: action, method, enctype, name,
accept-charset, novalidate,target, autocomplete
,
,creates a form in an HTML page.
The novalidate
and autocomplete
attributes are new in HTML5.