general purpose push button


<input type="button">

Browser
Internet Explorer Firefox Opera
Type
Inline-block Empty

The INPUT element defines an input field. When you specify "button" for the type attribute of this element, a general purpose push button is created.

This push button is used with JavaScript, etc.


<input type="button" value="Push Button">


Attribute Value Explanation
type=" " button the type of input field
value=" " button text the text displayed on the button

type="button"

Creates a general purpose push button.

value=""

Value is the text displayed on the button.

Tips and Notes

The style of the button can be changed with CSS. Please see the "Related Document" for details on CSS.


Example

<p><input type="button" value="Alert Button" onclick="alert('Example')"></p>
Output