Tutorials References Exercises Bootcamps Videos Menu
Sign Up Create Website Get Certified Upgrade

HTML <input type="button">

❮ HTML <input> type attribute


A push button that activates a JavaScript when it is clicked:

<input type="button" value="Click me" onclick="msg()">
Try it Yourself »

Definition and Usage

The <input type="button"> defines a clickable button (mostly used with a JavaScript to activate a script).

Browser Support

The numbers in the table specify the first browser version that fully supports the element.

type="button" 1.0 Yes 1.0 1.0 Yes


<input type="button">

❮ HTML <input> type attribute