Skip to content

Instantly share code, notes, and snippets.

@stevewithington
Last active February 25, 2021 17:34
Show Gist options
  • Save stevewithington/0b22fda1ad560c94212a98b030739d3c to your computer and use it in GitHub Desktop.
Save stevewithington/0b22fda1ad560c94212a98b030739d3c to your computer and use it in GitHub Desktop.
Windows Outlook Conditional CSS: Targeting Specific MSO Versions

Targeting Specific Outlook Versions

Outlook version(s) Code
All Windows Outlook (Most common) <!--[if mso]> your code <![endif]-->
Outlook 2000 <!--[if mso 9]> your code <![endif]-->
Outlook 2002 <!--[if mso 10]> your code <![endif]-->
Outlook 2003 <!--[if mso 11]> your code <![endif]-->
Outlook 2007 <!--[if mso 12]> your code <![endif]-->
Outlook 2010 <!--[if mso 14]> your code <![endif]-->
Outlook 2013 <!--[if mso 15]> your code <![endif]-->
Outlook 2016 <!--[if mso 16]> your code <![endif]-->

Conditional Logic

Code Description Example
gt greater than <!--[if gt mso 14]> Everything above Outlook 2010 <![endif]-->
lt less than <!--[if lt mso 14]> Everything below Outlook 2010 <![endif]-->
gte greater than or equal to <!--[if gte mso 14]> Outlook 2010 and above <![endif]-->
lte less than or equal to <!--[if lte mso 14]> Outlook 2010 and below <![endif]-->
| or <!--[if (mso 12)|(mso 16)]> Outlook 2007 / 2016 only <![endif]-->
! not <!--[if !mso]><!--> All Outlooks will ignore this <!--<![endif]-->

Reference: Outlook Conditional CSS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment