In this section, you will see the use of type attribute of button tag. It is define the behavior of button.
Attributes of type tag:| Attribute | Value | Description |
| Type | button submit reset |
Do nothing. submit a form. reset a form. |
Declaration syntax of type attribute of button tag in HTML5.
| <button type="value" >Text area </button> |
|
<!doctype html> <html > <head> <title> Insert title of document. </title> </head> <body> <p><b>Example of type attribute of button tag in HTML5.</b></p> <form> <table style="width: 50%"> <caption style="text-decoration:none">Employee Information</caption><tr> <td>EmpId</td> <td> </td> <td><input name="Text1" type="text"></td> </tr> <tr> <td>EmpName</td> <td> </td> <td><input name="Text4" type="text"></td> <caption><input name="Text3" type="text"></caption> </tr> <tr> <td>EmpAddress</td> <td> </td> <td><input name="Text2" type="text"></td> </tr> <tr> <td>EmpAge</td> <td> </td> <td><input name="Text5" type="text" style="width: 124px"></td> </tr> <tr> <td><button type="submit" > Submit</button></td> <td><button type="button" >Button</button></td> <td><button type="submit" >Submit</button></td> </tr> </table></form> </body> </html> |

No difference.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.