Using conditional comments you can target different versions of the email Outlook client and include your client specific HTML.
Targeting Outlook 2000
HTML
<!--[if mso 9]>
{Place your content here}
<![endif]-->
<!--[if lt mso 10]>
{Place your content here}
<![endif]-->
Targeting Outlook 2002
HTML
<!--[if mso 10]>
{Place your content here}
<![endif]-->
Targeting Outlook 2003
HTML
<!--[if mso 11]>
{Place your content here}
<![endif]-->
Targeting Outlook 2007
HTML
<!--[if gte mso 9]>
{Place your content here}
<![endif]-->
Targeting Outlook 2007, Outlook 2010, and Outlook 2013
HTML
<!--[if gte mso 12]>
{Place your content here}
<![endif]-->
Targeting Outlook 2010
HTML
<!--[if mso 14]>
{Place your content here}
<![endif]-->
Targeting Outlook 2013
HTML
<!--[if mso 15]>
{Place your content here}
<![endif]-->
8 Comments
how to target outlook.com?
Hi Smit Shah,
You can target Outlook.com by using a CSS element called [owa], and placing this before each class or id within your emails CSS, for the content you only want to be shown in Outlook.com
The following tutorial will give you instructions on how to implement this into your email: https://www.htmlemailcheck.com/knowledge-base/target-outlook-com-using-owa-element/
Let me know how you get along!
Kind Regards,
David
Hello, what if I wanted to just target all the email clients except for Outlook ? To add specific css rules inside style tag or just add some specific tables for all the other clients ? I tried wrapping the code by :
{Your css or html here}
But it doesn’t work and I don’t know the reason
Hello Sergio,
To target all other email clients but Outlook, you could try the following snippet which I know of but haven’t yet tested myself.
https://stackoverflow.com/questions/5982364/is-there-a-html-conditional-statement-for-everything-not-outlook
Let me know how you get along!
Kind Regards,
David
Hello David , I just wanted to tell you that I could add some specific HTML for all the email clients but Outlook. On the other hand, if I wrapped the style tag with all the css declarations inside the snippet, it doesn’t work . FYI
By the way, do you know something about BB work css support ? I can’t find information about that.. thank you !
Hi Sergio,
Thanks for letting me know, that’s great to hear! Funny enough I had a project this week which also required some elements to be hidden from Outlook clients ^^
I’m afraid I am not familiar with the support of CSS in BlackBerry Work.
Kind Regards,
David
Ups, it looks like the piece of code is not showing.. I just wrap code by the conditional comment in outlook adding the exclamation mark before “mso” .. FYI
Thanks for the update!
Yes, unfortunately the comments don’t want to allow HTML anymore.. I will need to fix that.