Skip to main content

Our email CSS engine is open source. Give it a star on GitHub 

Emailens

Outlook VML Background Generator

Builds a background image Outlook Classic draws as VML and the other 20 clients read as CSS, with a solid colour for images off. Copy the code; nothing leaves your browser.

@emailens/engine 0.18.22 · data last changed 10 Nov 2026

Start from:
Live preview

Outlook reads the VML <v:image>; every other client reads the CSS background-image. With images off, both fall back to your solid color.

vml-background.html
24 lines
<!-- Bulletproof background image: Outlook (VML) + all other clients -->
<div style="background-color:#1e1b4b;">
  <!--[if mso]>
  <v:image xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px;height:300px;" src="https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=1200&amp;auto=format&amp;fit=crop&amp;q=80" />
  <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="position:absolute;width:600px;height:300px;">
  <v:fill opacity="0%" color="#1e1b4b" />
  <v:textbox inset="0,0,0,0">
  <![endif]-->
  <div>
    <!--[if mso]><table role="presentation" border="0" cellpadding="0" cellspacing="0" width="600"><tr><td><![endif]-->
    <div style="background-image:url('https://images.unsplash.com/photo-1579546929518-9e396f3cc809?w=1200&amp;auto=format&amp;fit=crop&amp;q=80');background-position:center center;background-size:cover;background-color:#1e1b4b;max-width:600px;height:300px;">
      <table role="presentation" border="0" cellpadding="0" cellspacing="0" width="100%" height="300">
        <tr><td align="center" valign="middle" style="padding:24px;">
          <h1 style="margin:0;font-family:Arial,sans-serif;font-size:28px;line-height:36px;font-weight:bold;color:#ffffff;text-align:center;word-break:break-word;">Summer sale is live</h1>
        </td></tr>
      </table>
    </div>
    <!--[if mso]></td></tr></table><![endif]-->
  </div>
  <!--[if mso]>
  </v:textbox>
  </v:rect>
  <![endif]-->
</div>

The checker needs a computer screen.

Your next question

Other free tools: HTML Email Checker · CSS Support Lookup · CSS Inliner · Dark Mode Preview · Outlook Ghost Table Generator · Bulletproof Button Generator · Client Targeting Generator · Email Rendering Playground

Run this check on every email

The open-source CLI checks every template for VML and Outlook problems, free: npx @emailens/cli lint email.html (CLI docs).

GitHub Action (Pro). Pro is $19 a month. The pre-send gate in CI, and the history behind every check. See the plans →

Questions

Why don't background images show in Outlook?

Desktop Outlook on Windows uses the Microsoft Word rendering engine, where the CSS background-image property is not supported. The fix is VML: a <v:image> and <v:rect> block, wrapped in an <!--[if mso]--> conditional comment, that Word does understand.

What is VML in email?

VML (Vector Markup Language) is a legacy Microsoft markup that Outlook's Word engine still renders. Email developers use it to reproduce rounded buttons and background images that CSS alone can't deliver in Outlook.

Do I still need a fallback color?

Yes. Many clients block remote images until the recipient clicks 'show images', and accessibility settings can disable them entirely. A solid fallback background color keeps overlay text readable when the image doesn't load.