Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Preheader text in HTML email

I have added preheader text in my HTML template and it is working fine but when someone forward the newsletter from outlook, that texts are shown on the top. It doesn't happen in Gmail though.

<style>
.preheader { 
display:none !important; 
visibility:hidden; 
opacity:0; 
color:transparent; height:0; width:0; }
</style>
</head>
<body>
<span class="preheader" style="display: none !important; visibility: hidden; 
opacity: 0; color: transparent; height: 0; width: 0;">
We are offering a six-week Indonesian language course for adult learners.
</span>

Thanks!

Screenshot of how it looks when someone forward a newsletter

enter image description here

like image 650
KH2301 Avatar asked Dec 06 '25 03:12

KH2301


1 Answers

For best results across environments, you'll be better off inlining the CSS. I've always used this for preheaders.

<div style="display:none; font-size:1px; color:#e5e5e5; line-height:1px; font-family:Verdana, Helvetica, sans-serif; max-height:0px; max-width:0px; opacity:0; overflow:hidden; mso-hide:all;">
PREHEADER TEXT HERE
</div>
like image 196
gj-wes Avatar answered Dec 09 '25 14:12

gj-wes



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!