Advertisement
Home Open Editor ❯

HTML <input> type Attribute

Example

<form action="action.php">
  <label for="fname">First name:</label>
  <input type="text" id="fname" name="fname">

  <label for="lname">Last name:</label>
  <input type="text" id="lname" name="lname">
  
  <input type="image" src="submit.jpg" alt="Submit" width="50" height="50">
</form>

Try this code ❯

Meaning

Provides graphical submit button.

Displays an image defined by the src attribute.

The alt attribute displays if the image src is missing.


Standard Syntax

HTML: <input type="image">

XHTML: <input type="image" />


Advertisement

Home Open Editor ❯
Advertisement