Do I need to use style attribute everywhere, which leads to lots of duplication?
Some text
Many email clients will strip out CSS and classes, and one of the ways to ensure your content gets through is to use inline-css
. As pointed out, this is time consuming and a pain to maintain.
Fortunately the kind people over at mail chimp have developed a CSS Inliner tool.
So you can develop your email using CSS classes as you normally would, paste the html in to the tool, and receive correctly inlined CSS, perfect for emailing.
Takes a bit of tweaking and you need to declare everything, but it definitely does make life easier.
(e.g you have to declare font family, size and colour for p, h1, h2, h3, td, ul
rather than just body
, for instance).
use direct 'style' attribute for all tags, like teneff said in one of the answers here: 'not all email clients support full featured html'
You should be able to used the
Here is a complete guide:
HTML Email CSS Guide
Hope it helps.
you have to use style, but if you want it to be available for all of the email clients I can suggest you to use <font size="2" color="red"><b>Some text</b></font>