In this tutorial, you will see the use of form tag in HTML5.
In this tutorial, you will see the use of form tag in HTML5.HTML form tag is provides form to user. It support different controls. These
controls is input controls, which is use for input user data. A HTML form always
starts <form> tag. It is most important for each and every website, because it
is use for registration , order, searching etc.
Html form is a pair tag.
OR
Form is a container for containing controls like text, button, checkbox, radio
button etc. Form take information from user and process them.
<form attributes> controls</form> |
<!DOCTYPE html > <html> <head><title>Untitled 1</title></head> <body> <form name="form1"> <table style="width: 49%"> <caption><strong>Employee registration form</strong></caption> <tr> <td> <label>EmpName </label> </td> <td><input type="text" name="text" /></td></tr> <tr><td><label>EmpId </label></td><td><input type="text" name="Empid" /> </td></tr><tr><td> <label>Age </label> </td><td> <input type="text" name="age" /></td></tr> <tr> <td><button type="submit" value="Submit" >Submit</button></td> <td> <button type="reset" value="Reset">Reset</button> </td></tr></table> </form> </body> </html> |
The form tag is available in both HTML5 and HTML4.01. But there is some attribute in HTML5, that is not supported by HTML4.01.