VOOZH about

URL: https://www.geeksforgeeks.org/html/html-input-typeimage/

⇱ HTML <input type="image"> - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

HTML <input type="image">

Last Updated : 25 May, 2026

The HTML <input type="image"> element is used to create an image-based submit button in a form. Clicking the image submits the form data to the server.

  • Used to submit form data using an image button.
  • Created using <input type="image"> inside a form.
  • Supports attributes like src, alt, width, and height.

Syntax:

<input type="image">
  • image: It is used to define an image as the submit button.

Features

  • The input element does not accept a value attribute.
  • The image path is defined in the src attribute.
  • The input element is supported by various common attributes.

Example: In this example, we will use the HTML <input type="image"> element to create an image-based submit button for a form.

Example 2: In this example, we will make a login form & use the image as an input type to submit the form.

Comment
Article Tags: