HTML Image

HTML <img> tag is used to display image on the web page. The <img> tag is an empty tag, which means that, it can contain only list of attributes and it has no closing tag.

Attributes of HTML <img> tag

  • src - describes the source or path of the image.
  • alt - defines an alternate text for the image, if it can't be displayed. The value of the alt attribute describe the image in words.
  • width - It specify the width to display the image.
  • height - It specifies the height of the image.

See this example:

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example of HTML Images</title>
</head>
<body>
   <p><img src="https://nexladder.com/images/nexlogo.png" src="" /></p>
 </body>
</html>