Definition
Email conditionals are proprietary Microsoft Internet Explorer syntax, <!--[if ...]>, repurposed by email developers to target Outlook specifically. While originally designed for IE conditional CSS, Outlook's Word rendering engine continues to parse these comments, making them essential for cross-client email coding. They allow developers to send different HTML to Outlook than to other email clients.
The most common conditional is <!--[if mso]> which targets all versions of Windows Outlook that use Word's rendering engine. Content inside this conditional is rendered by Outlook but treated as an HTML comment by all other clients. The complementary <!--[if !mso]> targets non-Outlook clients, though its use is less common because standard HTML already serves as the non-Outlook experience.
Version-specific conditionals allow precise targeting. <!--[if gte mso 9]> targets Outlook 2007 and later (version 9 and above). <!--[if mso 16]> would target Outlook 2016 specifically. These version conditionals are useful when a VML fix is only needed for certain Outlook versions. Nesting conditionals creates complex layouts, such as displaying a VML background image in Outlook while showing a standard CSS background in all other clients.
Best Practices
Always close conditional comments properly with <![endif]-->. Missing end tags can cause rendering issues in both Outlook and non-Outlook clients.
Wrap VML code inside <!--[if mso]> conditionals to ensure only Outlook processes the VML elements. Non-Outlook clients receive standard HTML and CSS outside the conditional.
Use <!--[if !mso]><!--> as an open-to-everyone-except-Outlook syntax. The extra <!--> ensures other clients see the content while Outlook skips it.
Avoid over-nesting conditionals, which makes code difficult to maintain. Two or three levels of nesting is usually sufficient for most email layouts.
Test conditionals in multiple Outlook versions. Outlook 2010, 2013, 2016, 2019, and 365 can behave differently with the same conditional syntax.
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 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.
Email Graceful Degradation
An email design strategy that starts with a feature-rich layout and systematically reduces complexity for clients with limited rendering capabilities.
Frequently Asked Questions
It is a conditional comment that targets Microsoft Outlook on Windows. Any HTML or VML inside this comment is rendered only by Outlook. All other email clients treat it as an HTML comment and ignore the content.
No. Outlook for Mac does not use Word's rendering engine and does not parse MSO conditional comments. Outlook for Mac uses WebKit and supports standard CSS instead.
`[if mso]` targets Windows Outlook only. `[if !mso]` targets every email client that is not Windows Outlook. The syntax `` with a self-closing inner comment ensures proper parsing by all clients.
Yes, but it is more common to use conditionals to wrap VML or HTML structures. CSS inside conditionals is parsed only by Outlook and can be used to apply Outlook-specific styles or override values set in the main stylesheet.
The IE conditional comment feature was deprecated by Microsoft in Internet Explorer 10, but Outlook's Word rendering engine continues to support them. There is no current indication that Microsoft will remove this support from Outlook, but it remains a legacy technique.