How to display image in gmail mail in html

To display an image in a Gmail email using HTML, you can use the <img> tag and specify the image URL. Here's an example:

<img src="https://example.com/image.jpg" alt="Image description">

Replace https://example.com/image.jpg with the actual URL of the image you want to display.

You can also use inline styles to set the width and height of the image:

<img src="https://example.com/image.jpg" alt="Image description" style="width: 100px; height: 100px;">

This will display the image with a width and height of 100 pixels.

If you want to display the image as a link, you can use the <a> tag:

<a href="https://example.com">
  <img src="https://example.com/image.jpg" alt="Image description">
</a>

This will create a link to the specified URL, with the image as the link text.

Note that Gmail has some limitations on the types of images that can be displayed in emails. For example, Gmail may block images from unknown senders or images that are too large. You can check the Gmail help center for more information on image display policies.

Also, keep in mind that some email clients may not support HTML emails or may have different rendering rules, so it's always a good idea to test your email in different clients to ensure it looks as intended.

Here is a complete example of an HTML email that displays an image:

<html>
  <body>
    <h1>Image Example</h1>
    <img src="https://example.com/image.jpg" alt="Image description">
  </body>
</html>

This will display the image with a heading that says "Image Example".