Definition
VML (Vector Markup Language) is an XML-based vector graphics language that email developers use to overcome rendering limitations in Microsoft Outlook. Outlook 2007 through 2021 uses Word's HTML rendering engine, which does not support standard CSS features like background-image, border-radius, or padding on certain elements. VML provides a workaround by defining vector shapes and fills that Word can render.
In email, VML is most commonly used for bulletproof buttons. The v:roundrect element creates a button with rounded corners that renders reliably in Outlook, while the standard HTML <a> tag button handles all other clients. The VML is wrapped in <!--[if mso]> conditional comments so only Outlook processes it. This technique became standard practice around 2015 and remains the most reliable cross-client button solution.
VML is also used for background images via the v:rect and v:fill elements. The v:rect defines a rectangular area and v:fill specifies the image source and positioning. This allows Outlook to display background images that would otherwise be invisible due to the lack of CSS background-image support. The VML namespace is declared with xmlns:v="urn:schemas-microsoft-com:vml" and the v: prefix applies to all VML elements.
Best Practices
Always wrap VML code in <!--[if mso]> conditional comments to ensure it targets only Outlook. Non-Outlook clients should receive standard CSS or HTML equivalents outside these conditionals.
Declare the VML namespace at the top of your email's <html> tag with xmlns:v="urn:schemas-microsoft-com:vml" and include xmlns:o="urn:schemas-microsoft-com:office:office" for Office-specific elements.
Keep VML code minimal and well-structured. VML increases HTML size and complexity, so use it only where necessary for Outlook compatibility — typically buttons and background images.
Test VML rendering across Outlook versions. VML behaviour can differ between Outlook 2010, 2013, 2016, 2019, and Outlook 365. Use rendering tests to verify each version.
Be aware that Microsoft has deprecated VML in favour of SVG. While VML still works in current Outlook versions, its long-term viability is uncertain. Monitor Microsoft's announcements about Outlook's rendering engine.
Related Glossary Terms
Email Apple Mail
Apple's email client for macOS and iOS, known for the best CSS support among major email clients due to its WebKit rendering engine.
Email Background Image
A background image applied to an email's table cell or container, requiring VML fallbacks for Outlook due to its lack of CSS background-image support.
Email Bulletproof Button
A cross-client email button technique using VML for Outlook and standard HTML for all other clients, ensuring consistent appearance and clickability.
Email Conditional
Proprietary conditional comments used to target Microsoft Outlook with specific HTML or VML code for cross-client email rendering.
Email Ghost Table
A responsive email technique using hidden tables to conditionally show or hide content for mobile and desktop layouts across all email clients.
Email Gmail CSS
The subset of CSS supported by Gmail, which strips most `<style>` block rules and requires inline CSS for reliable rendering across web and mobile.
Frequently Asked Questions
The VML namespace is an XML declaration that tells the email client to interpret `v:` prefixed elements as VML shapes. It is declared as `xmlns:v="urn:schemas-microsoft-com:vml"` in the opening `` tag and is required for VML to work in Outlook.
No. Outlook for Mac uses the WebKit rendering engine, not Word's HTML engine. VML code wrapped in MSO conditionals will not render in Outlook for Mac. Mac Outlook supports standard CSS background-image, border-radius, and padding.
No. VML is Microsoft's proprietary XML vector format, while SVG is an open W3C standard. Microsoft deprecated VML in Internet Explorer 10 in favour of SVG, but Outlook's Word engine still relies on VML because it has not been updated to support SVG.
VML supports some basic animation through its vector animation features, but it is not reliable across Outlook versions. Standard email animation techniques using CSS animations or animated GIFs are preferred for clients that support them.
Without VML, Outlook will ignore or poorly render several CSS properties. Buttons will lose rounded corners and may have incorrect padding. Background images will not display at all. The overall layout will revert to a flat, unstyled version of your email.