Tutorials References Exercises Videos NEW Menu
Paid Courses Website NEW

HTML <input type="button">

❮ HTML <input> type attribute

Example

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.

Attribute
type="button" 1.0 Yes 1.0 1.0 Yes

Syntax

<input type="button">

❮ HTML <input> type attribute