AC
0
Hidden Preheader in ALT Attribute of Image Tag Not Working in Gmail
Hi everyone,
I've been using preheaders in my campaigns with decent results. For consistency in rendering, I started embedding it as ALT description of an image (either of the same color of the background or transparent), sized 1x1 or similar.
All was fine and I stopped worring too much about it.
I was making some tests today and, horror, gmail does not seem to get it anymore, they skip to the next line (normally "view in browser").
This happens on every Gmail product (inbox, android, web browser...). I can exclude the line is pulled out from the plain text version.
Does anyone have a similar experience / found a workaround?
Thanks,
Andrea
Try using this immediately after the
<body>
tag, no need to put it in a table.<div style="max-height:0;overflow:hidden;display:none;mso-hide: all;">Preheader text</div>
I was used to insert an "invisible" text of #color as the same of the background, in order to see it in the mobile preview, but not in the mail while it is open. I have to say that this way is a lot faster, although in this case when a recipient forwards the mail to another contact, the Preheader text will be written in the mail itself. Thank you!
Any reason why you don't use normal text? I know many years ago hiding content in 1x1 pixel gifs was a technique often used by spammers and was generally considered bad practice, although I should add I'm not sure that is still the case.
Well, yes, we have a reason for that.
We are concerned regarding accessibility, and we need to have a quite massive "view in browser" link at the very top of our emails. We cannot really derogate from this.
I don't know whether the 1x1 technique was used by spammers, but it might be. I know for sure that most spam filters tend to give a negative score to emails where a part of the content is not visible (poor contrast, small font size, etc).