Please note, this is a STATIC archive of website www.w3schools.com from 05 May 2020, cach3.com does not collect or store any user information, there is no "phishing" involved.
THE WORLD'S LARGEST WEB DEVELOPER SITE

HTML <input type="image">

❮ HTML <input> type attribute

Example

Define an image as a submit button:

<input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
Try it Yourself »

More "Try it Yourself" examples below.


Definition and Usage

The <input type="image"> defines an image as a submit button.

The path to the image is specified in the src attribute.


Browser Support

Attribute
type="image" Yes Yes Yes Yes Yes

Syntax

<input type="image">

More Examples

Example

Align input image (with CSS):

<input type="image" src="submit.gif" alt="Submit" style="float:right" width="48" height="48">
Try it Yourself »

❮ HTML <input> type attribute