X
Business

Dirty font tag secrets

I nearly used the font tag. There, I said it.Being freelance, I get used to the gritty reality of web development.
Written by Jake Rayson Rayson, Contributor

I nearly used the font tag. There, I said it.

Being freelance, I get used to the gritty reality of web development. Case in point, building HTML emails. CSS3?! I don’t think so, you’ll be lucky to get margin-top working (thanks, Hotmail). Background images? No, not without Outlook, which can be shortened to withOutLook. Oh, and the reams of inline styling. Delight.

Campaign Monitor have a fantastic resource, called Guide to CSS support in email, detailing which email client supports what CSS (hint, Microsoft doesn’t come out brilliantly). On the one hand, it makes for sorry reading, as though the Web Standards Project never existed. On the other, it is joyous to see how far we have come with regard to browser support, and the excitement of Responsive and Adaptive Web Design.

As previously intimated, there is no such thing as a cascading stylesheet with HTML emails, you have to write the CSS for every single HTML element. On the previous file I was working from, someone had styled the anchor tag, and then added a styled font tag. For those that don’t know, this is akin to praising the health benefits of menthol cigarettes.

The dreaded font tag
The dreaded font tag in action, conflating semantics and presentation.

I asked a colleague if the font tag was helping out the HTML email at all. He didn’t know but advised leaving it in, just in case! I have dared leave out, to hell with bad email clients. Unless, of course, it is required by withOutLook ;)

@growdigital

Editorial standards