Horje
How to create HTML Input Type Image

The <input type="image"> defines an image as a submit button.

The path to the image is specified in the src attribute.


How is to look HTML Input Type Image

index.html
Example: HTML
 <form>
<input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
</form> 

Full Code Example of HTML Input Type Image

Display an Image as the Submit button Note: The input type="image" sends the X and Y coordinates of the click that activated the image button.
index.html
Example: HTML
<!DOCTYPE html>
<html>
<body>

<h2>Display an Image as the Submit button</h2>

<form action="/action_page.php">
  <label for="fname">First name: </label>
  <input type="text" id="fname" name="fname"><br><br>
  <label for="lname">Last name: </label>
  <input type="text" id="lname" name="lname"><br><br>
  <input type="image" src="img_submit.gif" alt="Submit" width="48" height="48">
</form>

<p><b>Note:</b> The input type="image" sends the X and Y coordinates of the click that activated the image button.</p>

</body>
</html>

Output should be:

Full Code Example of HTML Input Type Image





Category:
Web Tutorial
Sub Category:
HTML Input Types
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference