Dofactory.com
Dofactory.com
Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

HTML <input> type="image"

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

This attribute accepts the path or URL of the image.

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>

Last updated on Sep 30, 2023

Earn income with your HTML skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides