Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML input src Attribute

HTML src property

HTML input Tag Reference HTML tag

Example

An HTML form with an image submit button:

  First name:

 

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the src property.


Definition and Usage

The src attribute specifies the URL of the image displayed as the submit button.

**Note:** The src attribute is required for and can only be used with .


Differences between HTML 4.01 and HTML5

none.


Syntax

Attribute values

Value Description
URL Specifies the URL of the image to be used as a submit button.

Possible values:

  • Absolute URL - points to another website (such as src="http://www.example.com/submit.gif")
  • Relative URL - points to a file within the website (such as src="submit.gif")
  • |

    HTML input Tag Reference HTML tag