HTML <input> src Attribute
HTML <input> tag
Example
An HTML form with an image that represents the submit button:
<form action="demo_form.asp">
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif" alt="Submit">
</form>
Try it yourself »
Browser Support

The src attribute is supported in all major browsers.
Definition and Usage
The src attribute specifies the URL of the image to use as a 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
Attribute Values
| Value |
Description |
| URL |
Specifies the URL of the image to use as a submit button. Possible values:
- An absolute URL - points to another web site (like src="http://www.example.com/submit.gif")
- A relative URL - points to a file within a web site (like src="submit.gif")
|
HTML <input> tag
Thank You For Helping Us!
Your message has been sent to W3Schools.
Close [X]