Input Type: Here's What It Does In HTML (Plus Code Example)

Disclosure: Your support helps keep the site running! We earn a referral fee for some of the services we recommend on this page. Learn more
Value of
How To Define Input Type In HTML (All The Values And Attributes)
What does Input Type: Here's What It Does In HTML (Plus Code Example) do?
Defines an image that is clicked to submit a form.

Code Example

<form action="myform.cgi">
<input type="file" name="fileupload" value="fileupload" id="fileupload">
<label for="fileupload"> Select a file to upload</label>
<br><input type="image" src="/wp-content/uploads/sendform.png" alt="Submit" width="100">
</form>

The image value allows us to specify an image that is used to submit a form, in place of a Submit button. Even though this image is being used as a button, you must still specify an alt description for the image.

Claire is seasoned technical writer, editor, and HTML enthusiast. She writes for HTML.com and runs a content agency, Red Robot Media.

Browser Support for image

iefirefoxchromeedgesafariopera
AllAllAllAllAllAll