7 days of unlimited WordPress themes, plugins & graphics - for free!* Unlimited asset downloads! Start 7-Day Free Trial
  1. Web Design
  2. HTML

Quick Tip: Remember to Style Your ALT Text

Scroll to top
Read Time: 2 mins
This post is part of a series called Strange and Unusual HTML.
Quick Tip: Consider Wrapping Your Code With a “figure” Element
Quick Tip: Set Relative URLs With the “base” Tag

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.

Did you find this post useful?
Want a weekly email summary?
Subscribe below and we’ll send you a weekly email summary of all new Web Design tutorials. Never miss out on learning about the next big thing.
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.