HOME HTML CSS JAVASCRIPT SQL PHP JQUERY XML ASP.NET MORE...
REFERENCES | EXAMPLES | FORUM | ABOUT

HTML <input> src Attribute

HTML input Tag Reference 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

Internet Explorer Firefox Opera Google Chrome Safari

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

<input src="URL">

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 Reference HTML <input> tag

Your suggestion:

Close [X]

Thank You For Helping Us!

Your message has been sent to W3Schools.

Close [X]
Search w3schools.com:

WEB BUILDING

Download XML Editor FREE Website BUILDER Free HTML5 Templates

SHARE THIS PAGE