The Ultimate Guide to Styled ALT Text in Email
A commonly accepted best practice in the email world is the inclusion of alt attributes (frequently known as an “ALT tag” or “ALT text,” which is shorthand for alternative text) for images.
There are a few reasons why this practice has become standard among email aficionados:
- Most email clients block images by default. In some cases, instead of showing the image, the email client will instead display the ALT text. This is definitely handy, especially in cases where an email design is predominantly composed of images. The ALT text can help communicate the message even if the images cannot.
- In a situation where images can’t or won’t load due to a bad connection, broken link, etc., the ALT text will appear instead of the image.
- Marketers and designers sensitive to the needs of visually impaired readers understand that ALT text is used by screen readers. Since these users are unable to view text or images, the ALT text serves to describe the image via the screen reader.
Setting up standard ALT text
Setting ALT text for images in an HTML email is simple. Known as an attribute, it’s a standard part of HTML’s syntax, and is included in the image tag:
It’s important to include height and width values as this creates a placeholder box for the ALT text to reside when images are disabled.
Standard ALT text display
Here’s what disabled images in an email without ALT text sent to Gmail looks like:
Compared to disabled images in an email with ALT text:
Which one would you rather receive?
Adding style to ALT text
You can also get fancy with your ALT text, adding a bit of inline CSS to change the font, color, size, style and weight of the ALT text:
Here’s the same example above, but with ALT text styles applied:
Styled ALT text support across email clients
While a nifty technique, this is still email we’re talking about, so naturally support is a bit scattered amongst different email programs. I’ve borrowed some elements from Salesforce’s impressive Dreamforce email to test styled ALT text for the following examples.
|ALT Text in Webmail Clients|
|Webmail clients||Images blocked by default||Displays ALT text||Displays styled ALT text|
*Until recently, Hotmail blocked images by default. See below for more details.
Webmail clients such as Gmail are the most diverse since these mail programs can be accessed in different browsers. In all webmail clients, support for styled ALT text relies on the browser being used. Styled ALT text is supported in current versions of Firefox, Chrome, and Safari.
For example, styled ALT text will be visible to a subscriber viewing their Gmail in Firefox, but not for a subscriber viewing Gmail in Internet Explorer.
Styled ALT text in Gmail/Firefox:
Styled ALT text in Gmail/IE:
ALT text on linked images
ALT text for linked images may be underlined or blue in some webmail clients. Yahoo! underlines ALT text in linked images, while Gmail both underlines and ignores specified colors, instead defaulting to a vibrant blue:
Hotmail & Outlook.com
Hotmail’s image blocking behavior is a bit agressive. Rather than simply displaying an empty container, it overlays each image with a grey block:
However, Hotmail users are being migrated to Outlook.com, and it looks like Hotmail no longer blocks images by default. Rather than blocking all images, Outlook.com claims to “block content from suspicious-looking senders,” though I’m not sure how they determine who looks suspicious! Randomly, some senders are “trusted,” automatically displaying images, while others throw a blocked content warning:
Users have the ability to block images for anyone not in their safe senders list in their Outlook.com settings. Outlook.com treats these two types of content filtering differently, using a Gmail-like image blocking behavior for “suspicious-looking” senders while using Hotmail’s grey boxes to block out images for users that have the stricter content blocking settings in place.
Desktop clients are a bit more reliable since there aren’t as many variables involved:
|ALT Text in Desktop Clients|
|Desktop clients||Images blocked by default||Displays ALT text||Displays styled ALT text|
|Outlook 2003||✔||sort of*||✘|
|Outlook 2007||✔||sort of*||✘|
|Outlook 2010||✔||sort of*||✘|
|Outlook 2013||✔||sort of*||✘|
*Outlook adds a security message to ALT text. More details below.
While Apple Mail and Thunderbird don’t block images by default, you can choose to do so in the preferences for each application. I manually enabled image blocking on these clients to see if they supported styled ALT text.
Outlook’s security message
Outlook 2003, 2007, 2010 and 2013 preface ALT text with a lengthy security message, stating “Right-click here to download pictures. To help protect your privacy, Outlook prevented automatic download of this picture from the Internet.” Unfortunately, this makes ALT text in these email clients near useless as it only appears at the very end of Outlook’s security warning:
Mobile clients have strong support for styled ALT text, which is great news—especially for marketers with heavy Android audiences.
|ALT Text in Mobile Clients|
|Mobile Clients||Images blocked by default||Displays ALT text||Displays styled ALT text|
|Android Email (4.0)||✔||✔||✔|
|Android Gmail (4.0)||✔||✔||✔|
|Blackberry OS 6||✔||✔||✔|
|Windows Phone 7.5||✔||✘||✘|
Like Apple Mail and Thunderbird, I manually updated my iOS settings to block images in order to observe how this mobile OS handles ALT text.
Styled ALT text in Android (Samsung Galaxy Nexus):
Styled ALT text appears identically in the email and Gmail apps in Android.
Styled ALT text in BlackBerry OS 6 (Torch 9810):
Styled ALT text in iOS (iPhone 5):
Image blocking in Windows Phone 7.5 (Nokia Lumia 900):
CSS font properties, links and length are variables
Diving into specifics, most of the following font properties are supported in clients that display styled ALT text:
I tried using Arial, Georgia, Courier New, Palatino Linotype, Trebuchet MS and Tahoma as ALT text fonts. All were supported in the clients I tested in:
I would assume that most web-safe or default fonts would be supported. I’d also recommend this list of commonly installed fonts on Windows and Mac.
Other notable image blocking behaviors
In many email clients, ALT text will disappear once the size or length of the text exceeds the width and/or height of the image container. Due to this behavior, it’s probably best to stick to shorter descriptions and smaller font sizes to avoid having your ALT text removed altogether.
Almost all email clients allow you to change your settings to display or hide images automatically (although most often hiding/blocking is the default setting), and they’ll prompt users to turn images on for individual messages. Some also allow users to add specific senders to a whitelist or address book, or select a “Always display images from…”
- Learn how to properly write descriptive ALT text for images, including details on how screen readers treat ALT attributes.
- Lauren points out some creative use of styled ALT text in emails from PizzaExpress
- We show how J.Crew’s emails can benefit from more descriptive ALT text on their images
- See more examples of how various clients display blocked images and ALT text on our image blocking Pinterest board