
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
How do we add a push button to HTML?
Use the <button> tag in HTML to add a push button. The HTML <button> tag is used for creating a button within HTML form. You can also use <input> tag to create similar buttons.
The following are the attributes of the <button> tag −
Attribute | Value | Description |
---|---|---|
autofocus![]() | Autofocus | Specifies that the button should have input focus when the page loads. |
disabled![]() | Disabled | Specifies the button is disabled. |
form![]() | form_id | Specifies the forms to which button belongs. |
formaction![]() | URL | Specifies the link where the form submits. |
formenctype![]() | application multipart/form-data text/plain | Specifies how the form data is encoded before sending it to server. |
formmethod![]() | get post | Specifies how to send form data. |
formnovalidate![]() | Formnovalidate | Specifies that the form data should not be validated. |
formtarget![]() | _blank _self _parent _top | Specifies where the response should be validated. |
Name | Name | Specifies the button name. |
Type | button reset submit | Specifies the button type. |
Value | Text | Specifies button's initial value. |
Example
You can try to run the following code to implement <button> tag in HTML −
<!DOCTYPE html> <html> <head> <title>HTML Button Tag</title> </head> <body> <form> <button name = "button" value = "OK" type = "button">My Button</button> </form> </body> </html>
- Related Articles
- How do we add a definition term in HTML?
- How do we add a menu list in HTML?
- How do we add a table row in HTML?
- How do we add a comment in HTML code?
- How do we add a noframe section in HTML?
- How do we add a noscript section in HTML?
- How do we add document title in HTML?
- How do we add glossary definitions in HTML?
- How do we add bold text in HTML?
- How do we add a sample computer code in HTML?
- How to add a button to print an HTML page?
- How do we add a single-line input field in HTML?
- Why do we use reset button in HTML forms?
- How to add icons in the button in HTML?
- How do we add the width in characters for in HTML?

Advertisements