Quick Tip: Remember to Style Your ALT Text

This post is part of a series called Strange and Unusual HTML Tags.
Meta Tags and SEO
Getting Started With Scalable Vector Graphics (SVG)
This post is part of a series called Mastering HTML Email.
Build an HTML Email Template From Scratch
The Complete Guide to Designing for Email

The alt attribute within an <img> tag provides alternative content for users who can't download images, or who have images turned off altogether. We use this attribute all the time to make our content more accessible, but have you ever considered what it actually looks like?

We're going to use the email template we built in a previous tutorial as an example, but the principles apply just as well to browser-based web design.

If we take a look at our file with images turned off, this is what it looks like:


Clearly the ALT text is unattractive — especially the links. We can do a few things to jazz it up.

For the main heading, we’re going to make the text much larger and change it to our dark blue instead of black. We do this by adding styles to the parent element (in this case a cell). These styles will then be applied to the alt tags within that cell.

This is our cell:

We’ll add some text styling so it looks like this:

And we'll style our social media links so that they become white:


Simple as that! Now we can be confident that our email will display well, even with images turned off.