Live Preview
Correct image embedding with the <img> element:


By the end of this tutorial, you’ll understand why there is no <image> tag in HTML and how to embed pictures correctly with <img>.
Images are essential for visual design, but many beginners search for an “image tag” that does not exist. This guide clears up the confusion and teaches the correct syntax, attributes, and best practices.
Learn why <image> is not valid HTML.
Embed pictures with the correct <img> element.
Master src, alt, width, and height.
Scale images across devices with srcset and sizes.
Explore picture, figure, and CSS backgrounds.
Write meaningful alt text for every image.
<image> Tag?The <image> tag is a common misconception among new web developers. Unlike the widely used <img> element, there is no <image> tag in HTML for embedding pictures in web pages.
When you want to add a photo, icon, or illustration to a page, use <img src="..." alt="...">. The word “image” describes the content — not the HTML tag name.
The <image> element has never been part of the HTML specification for regular documents, so it cannot be called deprecated. Browsers will not render <image> as an image. Developers should always use <img>.
Note: SVG markup includes an <image> element inside SVG documents only. That is a different technology and is not a substitute for HTML <img> in normal page content.
Since <image> does not exist, here is the correct syntax for the <img> tag:
<img src="photo.jpg" alt="Description of the image"><img> is a void element — no closing tag is required in HTML.src points to the image file URL or path.alt is required for accessibility (use alt="" only for decorative images).width and height to prevent layout shift while the image loads.<image> — it is invalid for HTML page content.| Use Case | Code Snippet | Notes |
|---|---|---|
| Basic image | <img src="photo.jpg" alt="..."> | Correct HTML |
| With dimensions | width="600" height="400" | Reserves layout space |
| Responsive | srcset="..." sizes="..." | Multiple resolutions |
| Wrong tag | <image src="..."> | Invalid in HTML |
| Lazy loading | loading="lazy" | Defers off-screen images |
| Art direction | <picture>...</picture> | Multiple sources |
<image> vs <img>The tag name matters — only one of these is valid for HTML pages:
| Feature | <image> | <img> |
|---|---|---|
| Valid in HTML | No | Yes |
| Browser renders photos | No | Yes |
| Deprecated | N/A — never existed | Active standard element |
| Common mistake | Beginners assume it exists | Correct choice |
<!-- Wrong: no such HTML tag -->
<image src="photo.jpg" alt="Photo">
<!-- Correct -->
<img src="photo.jpg" alt="Photo"><img> vs <picture>Both display images, but serve different needs:
| Need | Use | Why |
|---|---|---|
| Single image file | <img> | Simple, universal, minimal markup |
| Art direction (crop changes) | <picture> | Swap entirely different images by viewport |
| Modern formats (WebP/AVIF) | <picture> + source | Fallback to JPEG/PNG when needed |
| Responsive resolutions | srcset on img | Same image, different pixel densities |
Use these attributes on the <img> element (not on the non-existent image tag):
src RequiredURL or path to the image file.
src="photo.jpg"alt RequiredAlternative text for accessibility and when the image fails to load.
alt="A sunset over the ocean"width / height LayoutIntrinsic dimensions to reserve space and reduce layout shift.
width="600" height="400"srcset / sizes ResponsiveOffer multiple resolutions for different screen sizes and densities.
srcset="large.jpg 1024w"loading PerformanceDefer off-screen images with loading="lazy".
loading="lazy"title OptionalAdvisory tooltip on hover — does not replace meaningful alt text.
title="Enlarged view"<img
src="scenery.jpg"
alt="A beautiful mountain scenery"
width="600"
height="400"
loading="lazy"
>Always include meaningful alt text. Do not omit it or duplicate the filename.
Basic embedding, responsive images, and common mistake patterns with copy-ready code and live previews.
Correct image embedding with the <img> element:

The primary way to add pictures to a web page is the <img> tag — not <image>.
<img src="example.jpg" alt="Example image">Use <img> for logos, photos, icons, and illustrations. Combine with srcset for responsive layouts, or wrap in <picture> when you need format fallbacks or art direction.
Ensure images scale properly across devices with srcset and sizes on img.
<img
src="small.jpg"
srcset="large.jpg 1024w, medium.jpg 640w"
sizes="(max-width: 600px) 100vw, 50vw"
alt="Responsive image"
>Writing <image> instead of <img> will not display your picture.
<!-- Invalid in HTML -->
<image src="photo.jpg" alt="Photo">
<!-- Valid -->
<img src="photo.jpg" alt="Photo">Control layout and appearance of img elements with CSS — separate from the invalid image tag:
max-width: 100% Responsive scalingobject-fit Crop or containborder-radius Rounded cornersbackground-image Decorative only (CSS)/* Responsive images */
img {
max-width: 100%;
height: auto;
display: block;
}
img.avatar {
width: 64px;
height: 64px;
border-radius: 50%;
object-fit: cover;
}
img.hero {
width: 100%;
max-height: 400px;
object-fit: cover;
border-radius: 12px;
}Styled img preview

While <img> is the standard for content images, other methods exist for specific needs:
| Method | Best for | Notes |
|---|---|---|
<img> | Photos, icons, logos in content | Default choice — always include alt |
<picture> | Art direction, format fallbacks | Wraps source elements and an img fallback |
<figure> + <figcaption> | Images with captions | Semantic grouping for diagrams and illustrations |
CSS background-image | Purely decorative visuals | Not accessible content — no alt text |
SVG <image> | Images inside SVG graphics | Only within SVG markup, not regular HTML |
Images must work for all users, including those using screen readers:
alt="" so assistive tech skips them.title is optional and not a substitute.Point src at the image file and describe it with alt.
The browser downloads the resource and renders it inline in the document flow.
If the image fails to load, alt text is shown and announced.
Users see the picture and understand its meaning through alt text.
The <img> element is fully supported in all browsers. The non-existent <image> tag has no support because it is not valid HTML.
From legacy Internet Explorer to the latest mobile browsers — use img with confidence for all content images.
Bottom line: Use <img> for images. There is no HTML <image> tag to support.
Understanding HTML tag names prevents a common beginner mistake. The <image> tag does not exist in HTML — the <img> element is the correct, robust way to embed pictures.
Always include meaningful alt text, optimize file sizes, use responsive techniques when needed, and continue to the dedicated img tutorial for deeper coverage.
img for all content imagesalt text on every imagesrcset for responsive layouts<image> — it is not valid HTMLimg deprecated or confuse it with imagealt or use filenames as alt textBookmark these before you ship — they’ll save you from a common HTML mistake.
<image> is not valid HTML for page content.
<img> is the correct element for pictures.
image never existed — it was never deprecated.
Describe images for accessibility and SEO.
AccessibilityUse srcset and sizes on img.
img works in every browser today.
image element for embedding pictures in HTML pages. Use img instead.<img src="..." alt="...">. For art direction or format fallbacks, wrap sources in picture.img is the valid HTML tag. image is a common beginner mistake. SVG has a separate image element inside SVG only.Embed images with img in the interactive HTML editor — not the invalid image tag.
6 people found this page helpful