When crafting email campaigns, adhering to specific HTML guidelines within the email body can significantly improve deliverability, engagement, and user experience. This document outlines key best practices to follow before sending your email campaigns.
Image Optimization and Usage
- Prefer multiple small images over one large image: Spammers often use a single large image, which can flag your email as spam, especially if it lacks additional text content. This also helps with structure and alt text clarity.
- Compress images: Reducing image file size helps keep the overall email size down.
- Avoid embedding links within background images: This can lead to unintentional clicks while scrolling, resulting in a poor user experience.
- Use <img> tag instead of <svg>: Inbox Service Providers like Gmail and Yahoo may block <svg> tags, so use <img> to ensure your images render correctly. Additionally, if an SVG contains meaningful information, ensure its accessibility for all users.
- Reduce the number of images: Excessive images can increase email size, potentially leading to clipping and impacting deliverability.
Content and Layout
The arrangement and type of content play a vital role in email effectiveness.
- Use a combination of text, images, buttons, and bullets as required.
- Maintain a 60:40 text-to-image ratio: This helps balance visual appeal with textual content, which is important for deliverability.
- Strategically place Call-to-Actions (CTAs): Limit non-header/footer links to 3-5, prioritizing clear calls to action.
- Use links purposefully: Avoid over-linking images, as this can bloat email size, increase clipping, and negatively impact both user experience and deliverability. Not all images require a link.
- Use <table> tag instead of CSS flexbox: This ensures tables render correctly across all inbox providers. To know more about CSS properties that are supported in Gmail, refer to CSS Support.
- Add more elements in the same row rather than adding multiple rows: This can contribute to a more compact HTML structure.
- Don't add separate rows for mobile-only and desktop-only content: Design your emails to be responsive without needing distinct rows for different devices. This helps in maintaining the HTML size of your email body less than 102 KB and reduces clipping of emails.
- Avoid empty elements: Remove empty rows or content sections to keep the HTML clean and efficient. This helps in maintaining the HTML size of your email body less than 102 KB and reduces clipping of emails.
HTML Size and Clipping Prevention
- Keeping your email's HTML size under control is essential to prevent clipping in email clients like Gmail.
-
Ensure the HTML size of your email body is less than 102 KB: Emails exceeding this limit may get clipped in Gmail. To avoid clipping in Drag and Drop editors:
- Use default fonts.
- Use padding instead of divider rows.
- Compress images.
- Reduce the number of links: Fewer links can contribute to a smaller overall email size.
Deliverability and Spam Prevention
Certain practices help ensure your emails reach the inbox rather than the spam folder.
- Do not use link shorteners (e.g., https://bitly.com/ links): The reputation of the link shortener's domain can affect your email deliverability. Spammers frequently use link shorteners, which can negatively impact your emails if they use the same service.
- Avoid excessive use of capital letters or exclamation points: These can appear suspicious to spam filters.
User Experience and Responsiveness
Creating a seamless and accessible experience for all users is paramount.
- Make sure the email is visible without having to scroll: This improves immediate engagement.
- Create emails that provide a seamless experience on web, mobile, and tablet devices: Optimize for dark mode rendering and avoid horizontal scrolling to accommodate the majority of users who read emails on their phones. This improves accessibility.
- Use clear and uncomplicated language: This ensures the email is easy to read and understand for all recipients.
- Refer to CSS Support: For more information, refer to CSS properties supported in Gmail.
Accessibility
Elements | Do's | Dont's |
---|---|---|
Content and structure | ||
Logical reading order and structure |
|
Do not rely solely on visual styling (such as bolding or increased font size) to indicate headings within your content. Instead, use actual semantic heading tags (e.g., <h1>, <h2>, <h3>). This practice ensures proper content structure and accessibility for assistive technologies. |
Language declaration |
Ensure to specify the language of the email in the <html> tag (e.g., <html lang="en">). This helps screen readers use the correct pronunciation. |
|
Tables for layout (use with caution) |
|
Do not excessively nest <table> elements. Excessive nesting complicates email rendering across various clients and can confuse assistive technologies, hindering content accessibility. |
Text content |
|
|
Images and media |
||
Alternative text (Alt Text) for images |
|
Do not omit alt text or use non-descriptive placeholder text such as "image" or "graphic". |
Image usage |
Do not create emails composed entirely of images. Such a design renders content inaccessible to screen readers and invisible to users who have images disabled, significantly degrading the user experience. | |
Visual design and readability | ||
Color contrast |
Maintain a strong color contrast between text and its background. Aim for a minimum WCAG AA ratio of 4.5:1 for normal text and 3:1 for large text (18pt or 14pt bold). Utilize online contrast checkers to verify compliance. |
Do not rely solely on color to convey critical information. For example, when indicating an error, always provide an accompanying icon or text indicator in addition to (or instead of) colored text. |
Fonts and sizing |
|
|
Layout and spacing |
Utilize padding and white space effectively to enhance readability and visually separate content blocks. Implement padding instead of divider rows to avoid email clipping in Gmail. |
|
Interactive elements | ||
Links (CTAs) |
|
Do not add links to background images. This practice can lead to accidental clicks and a poor user experience. |
Buttons |
|
|
HTML and CSS practices |
||
CSS |
Utilize inline CSS to achieve maximum compatibility across various email clients. |
Do not use CSS properties (e.g., flexbox) that lack wide support across email clients. Instead, employ <table> tags for layout to ensure consistent and reliable rendering. |
Dark mode |
Ensure your HTML renders as expected in dark mode. This optimization typically involves implementing meta tags and CSS media queries (specifically prefers-color-scheme) to provide alternative styling rules. |
|
Testing |
||
Test across email clients and devices |
|
|
For more information on Accessible campaigns in MoEngage, refer here.
Essential Footer Information
A consistent and comprehensive footer builds trust and provides necessary information.
-
Make sure to add a consistent footer with brand details: This helps improve trust with end recipients. Include the following details in the footer:
- Brand name
- Postal address of the company
- Contact email or phone number
- Brief details on the brand
- Privacy policy link
- About Us or Contact Us link
- Working Unsubscribe link
- Social media links/icons
Testing and Engagement
Continuous testing and relevant content improve email campaign performance.
- Experiment using A/B testing: This helps check user preferences on certain HTML formats, elements, etc.
- Implement theme-based content: Particularly relevant for e-commerce and OTT platforms, themes based on popular shows, movies, or holidays can significantly increase recipient interest.