Implementation of form and formaction attribute of button tag in html5.
Implementation of form and formaction attribute of button tag in html5.In this section, you will see the use of form and formaction attribute of button tag. If form attribute presents in button. It specifies related form. The action attribute of form tag is a value of formaction.
Attributes of type tag:Attribute | Value | Description |
form | form id | Name or id of related form. |
formaction | URL | value of form action attribute. |
Declaration syntax of type attribute of button tag in HTML5.
<button attribute >Text area </button> |
<!doctype html> <html > <head><title> Insert title of document. </title> </head><body> <p><b>Example of form and autofocus attribute of button tag in HTML5.</b></p> <form id="form1" action="FormAttri_Tag].html"> <table style="width: 50%"> <caption style="text-decoration:none">Student Information</caption> <tr> <td>Stud_Id</td> <td> </td> <td><input name="Text1" type="text"></td> </tr> <tr><td>Stud_Name</td> <td> </td> <td><input name="Text4" type="text"></td> <caption><input name="Text3" type="text"></caption> </tr> </table> </form><p style="color:green">This button is not a form's controls. But it works as form control. </p><br> <button type="submit" form="form1" formaction="FormActionAttri_Tag">Submit</button> </body> </html> |
Not present in HTML4.01.