HTML image Tag

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 3 Examples
Images & Media

What You’ll Learn

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.

01

No image Tag

Learn why <image> is not valid HTML.

02

Use img Instead

Embed pictures with the correct <img> element.

03

Core Attributes

Master src, alt, width, and height.

04

Responsive Images

Scale images across devices with srcset and sizes.

05

Alternatives

Explore picture, figure, and CSS backgrounds.

06

Accessibility

Write meaningful alt text for every image.

What Is the <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.

💡
The correct tag is img

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.

Not Deprecated — It Never Existed

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.

📝 Syntax

Since <image> does not exist, here is the correct syntax for the <img> tag:

syntax.html
<img src="photo.jpg" alt="Description of the image">

Syntax Rules

  • <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).
  • Set width and height to prevent layout shift while the image loads.
  • Do not write <image> — it is invalid for HTML page content.

⚡ Quick Reference

Use CaseCode SnippetNotes
Basic image<img src="photo.jpg" alt="...">Correct HTML
With dimensionswidth="600" height="400"Reserves layout space
Responsivesrcset="..." sizes="..."Multiple resolutions
Wrong tag<image src="...">Invalid in HTML
Lazy loadingloading="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 HTMLNoYes
Browser renders photosNoYes
DeprecatedN/A — never existedActive standard element
Common mistakeBeginners assume it existsCorrect choice
image-vs-img.html
<!-- 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:

NeedUseWhy
Single image file<img>Simple, universal, minimal markup
Art direction (crop changes)<picture>Swap entirely different images by viewport
Modern formats (WebP/AVIF)<picture> + sourceFallback to JPEG/PNG when needed
Responsive resolutionssrcset on imgSame image, different pixel densities

🧰 Attributes

Use these attributes on the <img> element (not on the non-existent image tag):

src Required

URL or path to the image file.

src="photo.jpg"
alt Required

Alternative text for accessibility and when the image fails to load.

alt="A sunset over the ocean"
width / height Layout

Intrinsic dimensions to reserve space and reduce layout shift.

width="600" height="400"
srcset / sizes Responsive

Offer multiple resolutions for different screen sizes and densities.

srcset="large.jpg 1024w"
loading Performance

Defer off-screen images with loading="lazy".

loading="lazy"
title Optional

Advisory tooltip on hover — does not replace meaningful alt text.

title="Enlarged view"
attributes.html
<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.

Examples Gallery

Basic embedding, responsive images, and common mistake patterns with copy-ready code and live previews.

Live Preview

Correct image embedding with the <img> element:

JavaScript logo

Embedding Images

The primary way to add pictures to a web page is the <img> tag — not <image>.

embedding-images.html
<img src="example.jpg" alt="Example image">
Try It Yourself

📚 Common Use Cases

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.

Responsive Images

Ensure images scale properly across devices with srcset and sizes on img.

responsive-images.html
<img
  src="small.jpg"
  srcset="large.jpg 1024w, medium.jpg 640w"
  sizes="(max-width: 600px) 100vw, 50vw"
  alt="Responsive image"
>
Try It Yourself

Common Beginner Mistake

Writing <image> instead of <img> will not display your picture.

common-mistake.html
<!-- Invalid in HTML -->
<image src="photo.jpg" alt="Photo">

<!-- Valid -->
<img src="photo.jpg" alt="Photo">
Try It Yourself

Styling Images with CSS

Control layout and appearance of img elements with CSS — separate from the invalid image tag:

max-width: 100% Responsive scaling
object-fit Crop or contain
border-radius Rounded corners
background-image Decorative only (CSS)
img-styles.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

🔄 Alternatives to the image Misconception

While <img> is the standard for content images, other methods exist for specific needs:

MethodBest forNotes
<img>Photos, icons, logos in contentDefault choice — always include alt
<picture>Art direction, format fallbacksWraps source elements and an img fallback
<figure> + <figcaption>Images with captionsSemantic grouping for diagrams and illustrations
CSS background-imagePurely decorative visualsNot accessible content — no alt text
SVG <image>Images inside SVG graphicsOnly within SVG markup, not regular HTML

♿ Accessibility

Images must work for all users, including those using screen readers:

  • Always set alt — describe the image purpose, not just the filename.
  • Decorative images — use alt="" so assistive tech skips them.
  • Don’t use title instead of alttitle is optional and not a substitute.
  • Text in images — repeat important text in nearby HTML or alt when possible.

🧠 How Image Embedding Works

1

Author writes img with src and alt

Point src at the image file and describe it with alt.

Markup
2

Browser fetches the image

The browser downloads the resource and renders it inline in the document flow.

Network
3

Assistive tech reads alt text

If the image fails to load, alt text is shown and announced.

Accessibility
=

Visible, accessible image

Users see the picture and understand its meaning through alt text.

Universal Browser Support for <img>

The <img> element is fully supported in all browsers. The non-existent <image> tag has no support because it is not valid HTML.

Baseline · Since HTML 2

The img element works everywhere

From legacy Internet Explorer to the latest mobile browsers — use img with confidence for all content images.

100% img tag support
Google Chrome All versions · Desktop & Mobile
Full support
Mozilla Firefox All versions · Desktop & Mobile
Full support
Apple Safari All versions · macOS & iOS
Full support
Microsoft Edge All versions · Chromium & Legacy
Full support
Internet Explorer IE 6+ · Legacy environments
Full support
Opera All modern versions
Full support
<img> tag 100% supported

Bottom line: Use <img> for images. There is no HTML <image> tag to support.

Conclusion

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.

💡 Best Practices

✅ Do

  • Use img for all content images
  • Include descriptive alt text on every image
  • Optimize file sizes (JPEG, PNG, WebP, SVG)
  • Use srcset for responsive layouts

❌ Don’t

  • Write <image> — it is not valid HTML
  • Call img deprecated or confuse it with image
  • Omit alt or use filenames as alt text
  • Use CSS backgrounds for meaningful content images

Key Takeaways

Knowledge Unlocked

Six truths every developer should know about the image misconception

Bookmark these before you ship — they’ll save you from a common HTML mistake.

6
Core concepts
02

Use img

<img> is the correct element for pictures.

Correct Tag
⚖️ 03

Not Deprecated

image never existed — it was never deprecated.

Clarification
04

alt Is Essential

Describe images for accessibility and SEO.

Accessibility
📱 05

Go Responsive

Use srcset and sizes on img.

Pattern
06

Universal img Support

img works in every browser today.

Compatibility

❓ Frequently Asked Questions

No. There is no image element for embedding pictures in HTML pages. Use img instead.
No. It was never part of the HTML specification, so it cannot be deprecated. It simply does not exist for regular HTML documents.
Use <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.
It provides alternative text for screen readers and when images fail to load. It is essential for accessibility and SEO.

Practice Correct Image Syntax

Embed images with img in the interactive HTML editor — not the invalid image tag.

Try correct img syntax →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

6 people found this page helpful