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

Expand your Audience with MailUp’s New Database Building Area

All the tools and features you need to increase and better manage the recipients of your emails, in one place. And with the Look & ...

Read more

New Bounce Handling for Improved Deliverability

 Hard bounce. Anti-spam filters. Delivery rate. Deliverability. All those who work in email marketing who have never had to face these issues evoking something mysterious and ...

Read more

Rendering Emails Across Email Clients: Challenges and Workarounds

As a brand using email marketing, you need to ensure that your emails for subscribers are displayed exactly the way you intended. Most emails received ...

Read more

5 Great Ways To Grow Your Email List

Simply asking people to join doesn’t work. And your email list naturally loses 25-30% of their email subscribers every year. New contacts expect to be get ...

Read more

16 Tips for Creating High-Performing B2B Newsletters

If you're in business of marketing to business, then you definitely need an email newsletter. According to VTL Design, 72% of B2B buyers share information ...

Read more

Email & Mobile: all you need to know about responsive design

We have put some order to many mobile-responsive aspects to offer you techniques, tools, and best practices to create perfect emails for smartphones and improve ...

Read more