HTML <input> type="image"

The <input> tag with an type="image" attribute creates an image button that submits form-data to the server.

Example

#

An <input> element of type image.
Clicking the arrow image submits the form.





<form action="/tutorial/action.html">
  <label for="firstname">First name</label><br />
  <input type="text" id="firstname" name="firstname"><br />
  <label for="lastname">Last name</label><br />
  <input type="text" id="lastname" name="lastname"><br />

  <input type="image" src="/img/html/arrow.png" width="40" height="40" alt="Submit">
</form>

Using input type="image"

The <input type="image"> creates an image that is used as submit button.

The src attribute is specifies the path or URL of the image.


Syntax

<input type="image">

Browser support

Here is when type="image" support started for each browser:

Chrome
1.0 Sep 2008
Firefox
1.0 Sep 2002
IE/Edge
1.0 Aug 1995
Opera
1.0 Jan 2006
Safari
1.0 Jan 2003

You may also like

 Back to <input>
Guides