HTML: <input type="button">
XHTML: <input type="button"/>  or  <input type="button" />

Creates a customizable “push” button. Customizable buttons have no specific behavior but can be used to trigger functions created with JavaScript controls. Data from type="button" controls is never sent with a form when a form is submitted to the server; these button controls are for use only with script programs on the browser.

Start/End Tags

This is an empty element. In HTML, the end tag is forbidden. In XHTML, the element must be closed with a trailing slash as just shown. Developers may include a space character before the slash for backward compatibility with older browsers.


  • HTML 4.01
  • HTML5


Values: bottom | left | middle | right | top
Deprecated. Not in HTML5. Specifies the alignment of an image.


Values: None in HTML. (autofocus="autofocus" in XHTML)
HTML5 only. Indicates the control should have focus (be highlighted and ready for user input) when the document loads.


Values: None in HTML. (disabled="disabled" in XHTML)
Disables the control for user input. It can be altered only via a script. Browsers may display disabled controls differently (grayed out, for example), which could be useful for dimming certain controls until required info is supplied.


Values: id of the form owner
HTML5 only. Explicitly associates the input control with its associated form (its form owner). With this method, the input control does not need to be a child of the applicable form element.


Values: text
Required. Assigns a name to the control; a script program uses this name to reference the control.


Values: text
Specifies the initial value for this control.

HTML 4.01 <input> Events

Occurs when the element loses the input focus and its value has been modified since gaining focus
<input type="button" value="Push Me!" />

Rendered Example