HTML <image> Tag

There is no standard HTML <image> element for embedding pictures in a normal web page. The correct tag is <img>.

Beginners often search for an “image tag” because the content is an image. Learn the misconception here, then use <img src="…" alt="…"> in every new page.

Non-standard.

Do not use <image> in HTML documents. It is not on the HTML standards track for page images and will not work reliably for users.

SVG note.

SVG markup has its own <image> element inside an SVG document. That is not a substitute for HTML <img> in page content.

Correct replacement.

Use <img> with src and alt. For art direction, wrap it in <picture>.

HTML Syntax

Invalid vs correct. Always write the second form:

syntax.html
<!-- wrong --> <image …>
<img src=" url" alt="text">

<img> is a void element: start tag only, no end tag. Provide src (or srcset) and a useful alt.

Attributes

<image> has no standard HTML attributes for page embeds. Use these on <img> instead:

AttributeDescriptionTry it
srcURL of the image file to displayTry it
altText alternative when the image is missing or for screen readers. Use alt="" only for pure decorationTry it
width / heightIntrinsic size in CSS pixels — reserves space and helps avoid layout shiftTry it
srcset / sizesResponsive candidates and layout size hintsimg docs
loadingeager (default) or lazy to defer off-screen imagesTry it
decodingHint: async, sync, or auto for decode timingProgressive enhancement

Global Attributes

The correct <img> tag (not <image>) also supports the Global Attributes in HTML.

Live Preview

Switch real <img> samples. This is what you should use — not <image>.

A real <img> with src, alt, width, and height.

Preview
JavaScript logo

<img src="/images/javascript.png" alt="JavaScript logo">

HTML Examples

Short, copy-ready snippets using correct <img>. Use Try It Yourself for a live editor.

Example 1 — Correct <img> Embed

Load a file with src and describe it with alt.

HTML
<img
  src="/images/javascript.png"
  alt="JavaScript logo"
  width="128"
  height="128"
>
Try It Yourself

How It Works

  1. Use <img> — not <image>.
  2. Set src to the image path or URL.
  3. Write alt that describes the meaning of the picture.
  4. Add size attributes when you know them so the browser can reserve space.

Example 2 — Wrong <image> vs Correct <img>

Only the second line is valid HTML for a page image.

HTML
<!-- Wrong: not a standard HTML page element -->
<image src="/images/javascript.png" alt="JavaScript logo">

<!-- Correct -->
<img
  src="/images/javascript.png"
  alt="JavaScript logo"
  width="128"
  height="128"
>
Try It Yourself

How It Works

  1. Spot the wrong tag: <image> looks friendly but is not standard HTML for embeds.
  2. Replace with <img> using the same src and alt intent.
  3. Keep it void: no closing </img> in HTML.
  4. Remember SVG: an SVG <image> lives inside SVG markup only.

Example 3 — Reserve Space with Width and Height

Tell the browser the intrinsic box before the file finishes loading.

HTML
<img
  src="/images/circle_image.jpg"
  alt="Orange circle on a light background"
  width="160"
  height="160"
>
Try It Yourself

How It Works

  1. Match real dimensions (or the same aspect ratio) in width and height.
  2. Reduce layout shift while the image downloads.
  3. Scale with CSS later if needed (max-width: 100%; height: auto) without dropping the HTML hints.
  4. Keep alt meaningful even when size is set.

Example 4 — Lazy-Load an Off-Screen Image

Defer fetching until the image is near the viewport.

HTML
<img
  src="/images/nature-pattern.jpg"
  alt="Abstract nature pattern"
  width="200"
  height="140"
  loading="lazy"
  decoding="async"
>
Try It Yourself

How It Works

  1. Set loading="lazy" for images below the fold.
  2. Optional decoding="async" hints that decode can wait so other content paints first.
  3. Do not lazy-load LCP heroes — keep above-the-fold images eager.
  4. Still provide alt; performance attributes do not replace accessibility.

Edge Cases & Pitfalls

naming

Searching for “image tag”

The everyday word is image; the HTML element name is img. Bookmark <img>.

a11y

Missing or weak alt

Describe the purpose of the image. Use empty alt="" only when the picture is pure decoration.

svg

SVG <image> ≠ HTML

Inside SVG, <image> is a different element. In HTML body content, still use <img> (or inline SVG).

layout

No width / height

Without size hints, content may jump when the file loads. Prefer HTML dimensions plus responsive CSS.

css

Background images are not img

CSS background-image is for decoration. Meaningful pictures belong in <img> (or <picture>) with alt.

maps

Clickable regions

For image maps use <map> / <area> with <img usemap> — still not <image>.

Browser Support

There is no standard HTML <image> page element to support. Use <img>, which is core HTML in every browser.

✓ Non-standard · Use <img>

<image>

Not a standards-track HTML element for embedding pictures. Chrome, Firefox, Safari, Edge, and Opera all support <img> instead. SVG <image> is a separate SVG feature.

0% As HTML image embed (use img)
Google Chrome —
Use &lt;img&gt;
Mozilla Firefox —
Use &lt;img&gt;
Apple Safari —
Use &lt;img&gt;
Microsoft Edge —
Use &lt;img&gt;
Opera —
Use &lt;img&gt;
Samsung Internet —
Use &lt;img&gt;
Internet Explorer —
Use &lt;img&gt;
<image> in HTML Not for page embeds

Bottom line: Never ship <image> in HTML pages. Learn <img> (and picture when you need art direction).

Key Takeaways

  • Fact: HTML has no standard <image> tag for page pictures.
  • Use: <img src="…" alt="…"> every time.
  • Extras: width/height, srcset, loading, and <picture> when needed.
  • Do not confuse SVG <image> with HTML <img>.

One line: skip <image> in HTML — always embed with <img>.

Default CSS Settings

There is no standard user-agent stylesheet for an HTML <image> embed. For the correct <img> element, browsers treat it as a replaced element (exact rules vary slightly):

default.css
/* typical idea for <img> — not <image> */
img {
  /* replaced element; size from width/height or intrinsic file size */
  overflow-clip-margin: content-box;
  overflow: clip;
}

Style real images with CSS on img (or a class). Do not invent styles for a non-standard image tag in HTML.

Frequently Asked Questions

No. There is no standard HTML image element for embedding pictures in a web page. The correct tag is img.
It was never a standard HTML page element, so it is not “deprecated” in the usual sense — it is non-standard / invalid for normal HTML documents. Always use img.
img is the valid void element for inline images (src, alt, and more). image is a common beginner mistake in HTML. SVG has a separate image element inside SVG markup, which is not a replacement for HTML img.
At minimum provide src (or srcset) and a meaningful alt. Add width and height when you know the intrinsic size to reduce layout shift.
Use picture when you need art direction or format switching (different crops or file types). picture still wraps a required img fallback.
Do not rely on that. Some engines may create an unknown element or behave inconsistently. Spec-compliant pages use img only.

Next: img

Study the full HTML img tag tutorial next.

img tutorial →

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.

10 people found this page helpful