HTML Image

What is Image HTML?

To insert an image in HTML, use the image tag and include a source and alt attribute.

use the “<img>” tag. Then, insert the “src” attribute and add the “. png or jpg” it depend format of your image. image as the “src” value.


HTML Image Syntax:

This syntax it show how you can implement img in your website:

        
          <img src="imagename.jpg">
        
      

Example of Image in HTML:

Note :direct properly where you store image on your computer:

        
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>HTML Image Example</title>
</head>
<body>
  <img src="assets/image/cup.png" alt="A cup image">
</body>
</html>