HTML <input> src Attribute
Example
An HTML form with an image that represents the submit button:
<form action="/action_page.php">
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif" alt="Submit">
</form>
Try it Yourself »
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">.
Browser Support
The numbers in the table specify the first browser version that fully supports the attribute.
Attribute | |||||
---|---|---|---|---|---|
src | 1.0 | 2.0 | 1.0 | 1.0 | 1.0 |
Differences Between HTML 4.01 and HTML5
NONE.
Syntax
<input src="URL">
Attribute Values
Value | Description |
---|---|
URL | Specifies the URL of the image to use as a submit button. Possible values:
|
❮ HTML <input> tag