Search code examples
htmlemailhtml-email

HTML email preheader image ALT being ignored


I've been using an HTML email template for quite some time that has a few images and then a footer that is copy. The top image always has a descriptive ALT attribute that we assumed was being used for a preheader but we just noticed the footer is the text that comes through for the preheader text in email clients. Does ALT text not get recognized before the actual copy in the footer? Wouldn't the ALT text be the first text that would come through in the HTML and not the footer copy?


Solution

  • I wouldn't count on the Alt tag being in the Mail and getting recognized as a Preheader. I always use this Preheader:

    <div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;">
            PREHEADER
        </div>
    

    This works fine in every Client I've tested so far