HTML Button Tag, Radio Button Tag in HTML | HTML Button Tag Tutorial

HTML Button Tag


Define :
This tag defines or specifies a clickable button and inside the button element you put the text and tags like <i>, <b>, <em>, <strong>, <br>, <img>, etc.

For Example :

Output :
     
Browser Support
All browsers are supported like chrome, Microsoft edge, firefox, opera.

Global and Event Attributes
This tag also supports the global and event attribute in HTML.

 
Another Example :

Output :
    

Attributes :
Attribute value description
autofocus autofocus It specifies that a button should automatically get focus when the page loads
form disabled It specifies that a button should be disabled
disabled form_id It identifies which form the button belongs to
formaction URL It identifies where to send the form data when a form is submitted. Only for type="submit"
formenctype application/x-www-form-urlencoded
multipart/form-data
text/plain
It identifies or specifies how form data should be encoded before sending it to a server. Only for type="submit"
formmethod get
post
It specifies how to send the form data Only for type="submit"
name name It identifies or specifies the name of a button.
type button
reset
submit
It specifies the type of button
value text It specifies the initial value for the button
 
Example 3 :
Output :
    
Default CSS Settings
none