Image


Image will be used to display an Image. We can define an image in two ways.

  • For input tag we have to specify the type as "image", then it will render a Image in output.
  • We can define the Image by using <img> tag.

Syntax:

<input type="image" src="image source..." /> <img src="image source..." />

Example:

<html> <head> <title>HTML Tutorial</title> </head> <body> <div> Below image rendered by using input tag and type="image".<br /> <input type="image" src="/images/logo_medium.png" /> <br /> Below image rendered by using img tag.<br /> <img src="/images/logo_medium.png" alt="logo" /> </div> </body> </html>

Output:

Below image rendered by using input tag and type="image".



Below image rendered by using img tag.
logo