HTML <button> with type Attribute
HTML <button> with type Attribute
The type
attribute specifies the type of the button.
Note: The button element will work without type
attribute. But it is recommended to mention the type attribute because different browsers may use different default types for the <button> element.
button
Specifies that the button is dummy. You can use JavaScript to add functionality.
Example
Attribute Value
Value | Explanation |
---|---|
button | Specifies that the button is dummy. |
reset | Specifies that the form-data will reset to its default value when clicked. |
submit | Specifies that the form-data will be submited to the specific URL when clicked. |
reset
Specifies that the form-data will reset to its default value when clicked.
Example
submit
Specifies that the form-data will be submited to the specific URL when clicked.
Example
Reminder
Hi Developers, we almost covered 99.5% of HTML Tutorials with examples for quick and easy learning.
We are working to cover every Single Concept in HTML.
Please do google search for:
Join Our Channel
Join our telegram channel to get an instant update on depreciation and new features on HTML, CSS, JavaScript, jQuery, Node.js, PHP and Python.
This channel is primarily useful for Full Stack Web Developer.