Re: How to hide pre-header text?

Karen_Vuong
Level 2

How to hide pre-header text?

I have a short pre-header (23 characters). When I do inbox preview testing, I see my additional text from my email being pulled in also. Is there a way to prevent/hide that without extending my pre-header or changing my email layout?#pre-header#

Karen Vuong
Tags (1)
6 REPLIES 6
J_Grant_Gray
Level 4

Re: How to hide pre-header text?

Sant_Singh_Rath
Level 7

Re: How to hide pre-header text?

I don't think that's possible but it's strange that if pre-header is short then it's showing the content from email.

Best regards,
Sant Singh Rathaur
SanfordWhiteman
Level 10 - Community Moderator

Re: How to hide pre-header text?

... it's strange that if pre-header is short then it's showing the content from email.

Not at all, the preheader is itself content of the email! It just happens to be at the top of the HTML.

If you take the first N characters of the the text representation of an HTML element, it always includes text across different sibling/child elements.

For example, take this HTML fragment:

<div>
<div>
This is a hidden preheader.
</div>
<div>
This is like the body you intend to show.
</div>
</div>‍‍‍‍‍‍‍‍

The textContent of this fragment is:

 

 
This is a hidden preheader.

 

 

  This is like the body you intend to show.
‍‍‍‍‍‍‍‍‍


‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

(The line breaks are purposeful as they are preserved by textContent).

The innerText of the same fragment is

This is a hidden preheader.
This is like the body you intend to show.
‍‍‍

While textContent and innerText take different approaches to deciding what "the text version of HTML" is, in both cases you can see the text is taken from all possible elements. If you wanted N characters of the text it wouldn't matter what container it was originally in.

Kristina_Moy1
Level 2

Re: How to hide pre-header text?

As mentioned, the Litmus hack it probably the best way to optimize your preheader. Keep in mind that having a short preheader and using the hack means there will be a lot of blank space, so it's something you might want to A/B test if having a shorter or longer preheader helps. 

Geena_Boyer
Level 2

Re: How to hide pre-header text?

I usually use the first few sentences from the actual email header if the pre-header is too short. The header will provide more context about the email's content, which will hopefully make the reader want to read more.

Jackie_Potts
Level 7 - Champion Alumni

Re: How to hide pre-header text?

There is a great webinar from the North America VMUG that talks about preheader text in it. Brooke talks about why longer pre-header text is important as people use their phones and siri to even read their emails. More from the email is valuable and it is ok to go over the 80 character limit.

https://nation.marketo.com/events/2780-7-tips-to-improve-email-deliverability-and-accessibility-with...