Convert CSS Attributes To Style
Relative references are not suitable for emails because the absolute path will be of the URL where the email is opened, not where image is stored.
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?
-
Consistent Rendering: Different email clients may interpret HTML attributes inconsistently. Using inline styles ensures a more consistent rendering of your email across various platforms.
-
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.
-
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.
-
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.
-
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.