Home › Guides › How to add an image in HTML

How to add an image in HTML

Everything about the HTML <img> tag, with copy-paste examples.

FreePrivateNo sign-upNo watermark

The basic tag

<img src="photo.jpg" alt="Sunset over Lagos lagoon" width="800" height="600">

Do it free, right here

IMAGEHTML

Free · No sign-up · No watermark

Loading tool…

Fast, responsive images

<img src="photo-800.webp"
     srcset="photo-400.webp 400w, photo-800.webp 800w, photo-1600.webp 1600w"
     sizes="(max-width: 600px) 100vw, 800px"
     loading="lazy" decoding="async" alt="…">

Make the WebP versions with JPG to WebP and sizes with the resizer.

Get a link or embed code

No hosting? Image to URL gives you a temporary link, and the tool above turns small images into Base64 you can paste directly.