I have an email template
<html>
<body>
<div >
<h1>Kiedy-kolos</h1> </br/>
</div>
<div >
{{message}}
<br/><br/>
{{sender}}
</div>
</body>
</html>
And when I see simplified version of email, it first shows "Kiedy-kolos". This is the name of my service and I would not like it to be "read" by email client as a text. How can I hide it?
CodePudding user response:
What you are looking at is the inbox preview text. Email clients will not only show the subject, but often also the first line or so of the text inside the email, to give customers a 'preview' of what's in the email.
You can't remove this as such, but you can put some other text in front, if you like. Make sure it complements the subject line, and doesn't duplicate it, since they'll be side by side.
Add this code just after the <body>
tag:
<div style="display:none;">My preheader text</div>
Of course "Keidy-kolos" will display after that if it's still too short. If you've got nothing else to say, you could also add blank space. Email clients remove multiple spaces, and even multiple non-breaking spaces, so you'll need to use another special invisible character to do it.
Here's that in action:
<div style="display:none">My preheader text ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ ‌ </div>