input src Attribute - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Description

The src attribute specifies the URL of the image to use as a submit button.

The src attribute is required for <input type="image">, and can only be used with <input type="image">.

Attribute Values

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

An HTML form with an image that represents the submit button:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php">
  First name: <input type="text" name="fname"><br>
  <input type="image" src="https://www.java2s.com/style/demo/Opera.png" alt="Submit" width="48" height="48">
</form><!--from w w  w.  ja v  a2  s. c o  m-->

</body>
</html>

Related Tutorials