This week we dip our feet in email design territory, exploring what CSS and inline CSS are.
CSS stands for Cascading Style Sheets and it’s a styling language used in web and email design. You can use it to set attributes like font size, colour, alignment, etc. which are then applied to your HTML. Here’s an example:
This would set any <h1> in the document to be the colour green and have a margin of 30 pixels from the left-hand side.
With inline CSS you specify how you want different elements of your email to look like inside their respective HTML tags (e.g. <h1> or <td>). Here’s an example of the above as an inline style:
<td style=”color:#00a651; padding-left:30px;”>Heading 1</td>
This is the more recommended method for styling emails, even though it’s more time-consuming (having to add the styles to each element). This is because if you use embedded or external styles you’ll find a lot of email clients ignore them.
To make sure your emails look like you intend them, use the Content & Spam Checker in MessageFocus to test them before you hit ‘launch’.
If you have a term you’d like explaining, simply leave a comment below. Or see other Terms of the Week.