HTML <input> srcAttribute
Examples
HTML form with an image submit button:
<form action="demo_form.html">
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif.html" alt="Submit">
</form>
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif.html" alt="Submit">
</form>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the src attribute.
Definition and Usage
The src attribute specifies the URL of the image displayed as the submit button.
Note:The src attribute is required for <input type="image"> and can only be used with <input type="image">.
Differences between HTML 4.01 and HTML5
None.
Syntax
<input src="URL.html">
Attribute Values
| Value | Description |
|---|---|
| URL | Specifies the URL of the image to be used as the submit button. Possible values:
|
HTML <input> Tag Other Extensions