Use current industry practices to ensure email clients can render emails appropriately.
Emails do not follow the same rules as websites when interpreting and rendering HTML and CSS. Rendering emails is far more complex. Different email clients, webmail clients, and apps often use other rendering engines and interpret code in ways that often make comprehension more difficult.
To ensure emails display as consistently as possible and are robust enough to function in both new and older email clients, webmail clients, and apps, developers should write HTML and CSS according to current industry practices for email.
Practices
- Use HTML and CSS: Use the languages HTML and CSS to ensure email clients, browsers, and assistive technologies, amongst others, can interpret the email code and render it appropriately.
- Set the language: In the code, set the human language to English using the character code ‘en’.
- Encode characters: Use Unicode (UTF-8) for character encoding in emails, so email clients, webmail clients, and apps understand how to interpret characters and symbols in the content.
- Use ARIA roles where appropriate: Use ‘role=presentation’ on HTML tables, so it’s clear to people using assistive technologies (e.g. screen readers) that the tables are used for layout and not to convey information.
Updated on
June 26th 2023