Become an email & SMS marketing pro

Subscribe to get news, tips and updates delivered to your inbox.

Notify me on Messenger
10 min

Update: Check out how easy it is to customize the preheader text in MailUp (version 8.8.3)

The preheader is text that email clients show next to the email subject line. As an extension of the subject line, it can provide a preview of what your email is about to your recipients, and therefore can impact the Open Rate.

An extension of the subject line

Preheader in email

Hiding the preheader

The issue with having a good preheader is that that same text may not be what you want at the top of the message once the message has been opened. So in a blog post earlier this year we suggested using the following code to hide the preheader when the message is opened.

<div style=”display: none !important; mso-hide:all;”>This is a great newsletter that you can’t miss!</div>

There are other ways to hide the text, such as by setting its color equal to the background color. However, setting the FONT color to match the background color is not ideal:

  • Setting the text as transparent or quasi-transparent can trigger a red flag in a SPAM filter. For example, Spam Assassin has a specific rule for “low contrast font“.
  • Setting the text to be equal to the background color is not a Web design best practice, and you likely have a Web version of your message, linked to from other Web pages.
  • You have to change the code every time the background color changes.

The Microsoft issue

The second portion of the code mentioned above (mso-hide:all) deals with Microsoft Outlook, hiding the text in the Outlook email client. Without using that piece of code, the preheader will show in Outlook.

The problem is that some HTML editors “clean up” non-standard HTML (and that tag belongs to the category), removing the code.

The solution

The solution is to move that code to the head section of the page creating a CSS class, and then using the class in the BODY of the message.

So, in the HEAD section of the page you will have:

<style>
.preHeaderHide {display: none !important; mso-hide:all !important;}
</style>

And then in the BODY of the message:

<div class=”preHeaderHide” style=”display: none !important;”>This is a great newsletter that you can’t miss!</div>

… which invokes the CSS class to take care of MS Outlook, and still includes inline CSS for Gmail and other email clients that want inline CSS.

If you see any problems with this approach, let us know in the comments!

P.S.: see our initial post on using the preheader >

Liked this article? We have plenty more in store for you.

Subscribe to get news, tips and updates delivered to your inbox.

Read also

7 Fresh Design Ideas for Your New Year’s Email Marketing

‘Tis the season of sending holiday emails! From last-minute sales and promotions to warm greetings and thank yous, we know you’re hard at work this ...

Read more

How To Build An Effective Welcome Series

Automated welcome workflows are the best way to start the relationship with news users on the right foot. Here is a hands-on tutorial and 4 ...

Read more

6+6 Ways to Create a Holiday Gift Guide for Email

One of the biggest challenges for those involved in marketing is to be able to generate demand for the products they're offering. In other words, ...

Read more

Bring your emails to life with video, animated GIFs, countdowns and dynamic images

How-to, pros and cons: why and how to give a dynamic boost to messages in order to increase opens and conversions.  According to a recent Cisco ...

Read more

8 Promotional Emails That Actually Work

How to ensure that your promotional emails nail the task they're set out to do - boost conversions? Here are 5 tips to keep in ...

Read more

Black Friday: an Email Marketing Strategy in 8 Steps

The key to making the most of 24 November (and the long legacy that lingers on until Cyber ​​Monday) is to prepare in good time, ...

Read more