Click to call
Linkedin Twitter
  • Home
  • Expertise
  • Contact Us
  • Testimonial
  • Creative
  • Blog
  • Home
  • Expertise
  • Contact Us
  • Testimonial
  • Creative
  • Blog
  • info@bsamarketing.com
  • 01457 851111
  • Home
  • Expertise
  • Contact Us
  • Home
  • Expertise
  • Contact Us
  • Testimonials
  • Creative
  • Blog
  • Testimonials
  • Creative
  • Blog
Twitter
LinkedIn

Converting CSS to In-line for Emails

Over the years, we have done a number of posts about email design best practice, and these highlight one feature of email design, that can create some time consuming work. That is the issue of inline CSS. When you design your email, you will normally find that CSS is defined using classes, with the classes defined in a block at the top of the code. For websites, using class-based CSS, and ideally referencing your CSS from a separate, dedicated style page on your website is very much the preferred option. This is not the when designing emails. Because oof the way many email clients render HTML emails, it is much more reliable to include CSS style data in-line, in the body of your message.

Eg:
<style> .style1 {font-size:12px;} </style>
<body> <p class=”style1″> the content</p> </body>

However for email, these css styles need to be defined “inline” using style=”” rather than Class=””.  so the above code, set up for email would be:

<body> <p style=”font-size:12px;”> the content</p> </body>

Although it is a simple case of cut and past to deliver this format, in more complex emails, this can be a time consuming job. But no more, as we have found this useful tool for converting classes to inline CSS: Premailer – Pre-flight for HTML email. Simply click on the “Paste HTML as the source ” text, and past the code you want to convert into the box that appears, and click “submit”. The site will then deliver the in line css for you to copy and past back into your email. We have used it on a number of emails, and the CSS it delivers seems pretty accurate. However, as always, make sure you test your emails before sending them. If all this seem like hard work, and you would like some help in ensuring that your emails reach their destination looking as you had intended, please feel free to get in touch, we are always happy to discuss the options.

Picture of Duncan Wright

Duncan Wright

Over the past 25 years, working in both the corporate world, and the field of SME marketing consultancy, Duncan Wright has developed extensive knowledge & experience that really adds value to BSA Marketing's clients. As a member of the CIM, and as a Chartered Marketer, Duncan has the marketing knowledge to come up with relevant and innovative marketing strategies for clients, whilst at the same time possessing the technical knowledge to turn these strategies into relevant and sustainable marketing campaigns in the real world.
Twitter Linkedin
  • info@bsamarketing.com
  • 01457 851111
BSA Marketing
Glossop Gasworks
Arundel Street
Glossop
SK13 7AB
© BSA Marketing 1996-2026
  • Terms & Conditions
  • Data Privacy
  • Contact Us
  • Support
  • Terms & Conditions
  • Data Privacy
  • Contact Us
  • Support
Contact Us

Let's TALK

Our relationships with our clients are key to our business but we all have to start somewhere. If you have any questions, please drop us a line – or call on 01457 851111

You can also check us out on Twitter or LinkedIn. 

Twitter Linkedin

Contact Us