Open In App
Related Articles

HTML | <button> type Attribute

Improve Article
Save Article
Like Article

The <button> type attribute is used to specify the type of button. It specifies the type attribute of <button> element. The default types of <button> element can vary from browser to browser.


<button type="button|submit|reset">

Attribute Values:

  • submit: It defines a submit button. It has a default value for all browser except Internet Explorer.
  • button: It defines a clickable button. It has a default value for Internet Explorer.
  • reset: It defines a reset button which is used to change the previous data from the form.



<!DOCTYPE html>
            HTML button type Attribute
        <h3>HTML button type Attribute</h3>
        <form action="#" method="get">
            Username: <input type="text" name="uname">
            Password: <input type="password" name="pwd">
            <button type="submit" value="submit">
            <button type="reset" value="reset">



Supported Browsers: The browser supported by HTML <button> type attribute are listed below:

  • Google Chrome
  • Edge 12
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape, GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out - check it out now!

Last Updated : 20 Jul, 2022
Like Article
Save Article
Similar Reads
Complete Tutorials