HTML input src attribute
Examples
With an image submit button HTML form:
<form action="demo_form.html">
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif" alt="Submit">
</form>
First name: <input type="text" name="fname"><br>
<input type="image" src="submit.gif" alt="Submit">
</form>
try it"
Browser Support
All major browsers support the src attribute.
Definition and Usage
Src attribute specifies the URL submit button displayed as an image.
Note: src attribute for the <input type = "image"> attribute is required, and only used with <input type = "image"> used in conjunction.
Differences between HTML 4.01 and HTML5
no.
grammar
<input src="URL">
Property Value
值 | 描述 |
---|---|
URL | 规定作为提交按钮来使用的图像的 URL。 可能的值:
|
HTML <input> tag