This <form> element creates a form and submits to send information to a server for further processing.
<form> |
Yes | Yes | Yes | Yes | Yes |
HTML5 has added two new attributes: autocomplete
and novalidate
, and removed the accept
attribute.
The <form> tag supports the Global Attributes in HTML.
The <form> tag supports the Event Attributes in HTML.
form { display: block; margin-top: 0em; }
A demo showing how to use <form> tag.
<html>
<body>
<form name="form2" method="post" action="your.htm">
<input type="text"
name="textfield2"
value="This is a text field"
size="30"/>
<br/>
<input type="checkbox"
name="checkbox2"
value="checkbox"/>A checkbox.
<br/>
<input type="radio"
name="radiobutton"
value="radiobutton"/>A radio button.<br/>
<input type="button"
name="myButton2"
value="Submit"/>A submit button.
</form><!--from w ww. j a v a 2 s. c o m-->
</body>
</html>