Skip to the page
html email reference · images & buttons

Image width and height in HTML email

type
attribute
applies to
<img> tags in email
screen reader effect
n/a
common values
width="120" height="40" (pixel values, no unit)

Where it goes

On every <img> tag in an email, alongside its src and alt.

Example

<img src="hero.png" alt="Summer sale, 30% off" width="600" height="200" style="display: block;">

Open this example in the editor →

Common mistakes

  • Relying on CSS width/height instead of the HTML attributes — several clients that strip <style> blocks strip inline CSS sizing too, but still respect the plain HTML attributes.
  • Skipping alt text because "the image says it all" — with images blocked by default, alt text is often the only thing the recipient sees at all until they choose to load images.

Updated 24 October 2026. Practice it in the html email route, or read more on MDN.