How to Add custom Pre-header text inside your HTML email templates?

Question

How to Add custom Pre-header text inside your HTML email templates?

Answer

The email client will usually grab the first text inside the body, so you can include an invisible line at the beginning of the html body:

<style> /* ... */ /*--- Preheader declaration in style block in addition to inline for Outlook */ .preheader { display:none !important; visibility:hidden; opacity:0; color:transparent; height:0; width:0; }
</style> </head> <body> <!-- PRE-HEADER TEXT --> <span class="preheader" style="display: none !important; visibility: hidden; opacity: 0; color: transparent; height: 0; width: 0;">Preheader text shows up in GMail, iOS, Mail.app, &amp; more: 75 text char limit</span>
...

Was this article helpful?
Have more questions? Submit a request