How to specify the type of button using HTML5 ? Last Updated : 16 Mar, 2021 Summarize Comments Improve Suggest changes Share Like Article Like Report In this article, we will see how to set the button type using HTML. The <button> tag in HTML is used to create a clickable button within form on your webpage. The button type attribute specifies the type of button (You Should Always Declare the type of button). The <button> tag defines a clickable button and used to submit forms or anywhere in a document for accessible, standard button functionality. Syntax: <button type=" "> Example 1: This example creates a simple button using type as button. HTML <!DOCTYPE html> <html> <body> <h2>Welcome To GFG</h2> <button name="button" type="button"> Click Here </button> </body> </html> Output: Example 2: This example creates a submit form on button click. HTML <!DOCTYPE html> <html> <body> <h2>Welcome To GFG</h2> <form> Enter Name: <input type="text" name="name" /> <br/> <button type="submit" onclick= "alert('Welcome to GeeksforGeeks')"> Submit </button> </form> </body> </html> Output: Before clicking the button: After clicking the button: Example 3: This example creates a reset form button. HTML <!DOCTYPE html> <html> <body> <h2>Welcome To GFG</h2> <form> Enter Name: <input type="text" name="name" /> <br/> <button type="reset">Reset</button> </form> </body> </html> Output: Before clicking the button: After clicking the button: Comment More infoAdvertise with us Next Article How to specify the type of an input element using HTML ? A aksrathod07 Follow Improve Article Tags : Web Technologies HTML HTML-Tags HTML-Attributes HTML-Questions +1 More Similar Reads How to specify the type of an input element using HTML ? In this article, we will specify the type of an input element using HTML. The HTML <input> type attribute is used to specify the type of <input> element to display. The default type of <input> type attribute is text. Syntax: <input type="value"> Attribute Values: button: It i 4 min read How to specify that a button should be disabled using HTML5? In this article, we specify a disabled Button by using a disabled attribute in a <Button> Element. A disabled button is un-clickable and unusable. It is a boolean attribute. Syntax: <button disabled></button> Example: html <!DOCTYPE html> <html> <head> <title 1 min read How to use URL of the image as a submit button in HTML ? The HTML <input> type attribute is used to specify the type of <input> element to display. The default type of <input> type attribute is text. In this article, we set the image as button value. It creates the image as the submit button. Syntax: <input type="image"> Attribute 1 min read How to add icons in the button in HTML ? Adding icons in buttons in HTML involves including visual symbols or images within buttons to enhance their appearance and usability. This can be done using icon libraries like Font Awesome, Bootstrap Icons, or Material Icons, or by inserting images directly with <img> tags for visual cues.Add 3 min read HTML DOM Button type Property The Button type Property is used to set or return the value of a type attribute of a <button> element. Syntax: It returns the type property.buttonObject.typeIt sets the type property.buttonObject.type = "submit|button|reset"Property Values: Property Value Description submit It defines a sub 2 min read HTML <input type = "button"> The HTML <input type="button"> element creates a clickable button that can be customized with text or an image. It does not have any default behavior but can be used to perform actions using JavaScript. It makes versatile for various interactive purposes in web forms and applications. Syntax 1 min read Like