What are CSS Attributes?

Some HTML elements allow you to define CSS related attributes instead of using the style attribute. For example

<div width="100">

To ensure compatabilty accross all emails clients Campaign Cleaner will convert the attribute with into a style width also.

<div style="width:100px" width="100">

Some attributes after the conversion will be removed, like bgcolor, some we will leave both in place, because it can affect the rendering layout of your newsletter.

Why is this important?

  1. Consistent Rendering: Different email clients may interpret HTML attributes inconsistently. Using inline styles ensures a more consistent rendering of your email across various platforms.

  2. Compatibility: Some email clients might not support certain HTML attributes for styling, and using inline styles is a more universally accepted method for styling HTML elements in emails.

  3. Responsive Design: Inline styles provide better control over responsive design. By specifying styles directly in the HTML elements, you can tailor the appearance of your email content to different screen sizes and devices.

  4. Avoiding Quirks: Some email clients have quirks and limitations when it comes to interpreting HTML attributes. Inline styles are a safer choice to avoid potential issues with how your email is displayed.

  5. Cross-Client Compatibility: Different email clients have varying levels of support for HTML and CSS. Using inline styles increases the likelihood that your styling will be correctly applied regardless of the email client.