HTML Body Best Practices

Search knowledge

Browse topics written especially to help answer common question.

Table of Contents

What are HTML Body Best Practices?

There are several factors that go into email deliverability. One major factor is the structure of your email which consists of HTML.

Every email you send is scanned by spam filters such as SpamAssassin. They will review the entire HTML body of your email to see if it resembles spam.

If your email is flagged by a filter, it can be rejected or sent straight to the spam folder.

How does HTML work with Email?

HTML or HyperText Markup Language is used to format the text and images within your email.

Why are HTML Body Best Practices important?

According to a Jupiter Research survey, HTML emails have an adoption rate of 97% with only 3% of users receiving only text-based emails.

The HTML within your email has a big impact on your engagement, deliverability and conversions. It’s important to optimize your emails so they render properly on all devices.

How can you optimize your HTML for deliverability?

Millions of spam-like emails are sent everyday. It’s important to follow these key best practices within your HTML.

  • Use a 60% to 40% text to image ratio – Spammers may use several images within an email to display information without text. Using a 60 to 40 text to image ratio will help you avoid the spam folder.
  • Ensure your text is easy to read – Use common fonts such as Arial, Helvetica and Times New Roman. Pair your text with colors that are easy to read.
  • Nest HTML Tags – Be sure to properly nest of your HTML tags. This will help your email to render properly.
  • Use Alt Tags for images – Depending on your subscriber’s email client, your images may be blocked by default. Adding an Alt Tag will improve the accessibility of your email while adding context to your images.
  • Ensure your Emails are mobile friendly – Use media queries to increase the size of your text on small screens. Use thumb-sized (46x46px) areas for links.
  • Don’t reference external CSS files – The major email providers such as Gmail, Yahoo and AOL will not support external CSS. Use in-line CSS and test to make sure your emails are rendering properly.
  • Don’t use deprecated Elements – Stay away from using HTML tags and elements that have been deprecated. View a list of deprecated tags and attributes here.
  • Clean up your HTML – Clean up unnecessary attributes, empty tags , comments and other junk code before you hit send.

What does MailGenius cover with regards to HTML Body Best Practices?

  • Spam Phrases – We check to see if your email copy contains any common words or phrases that are used by spammers.
  • HTML Image Links – We check the ratio of clickable images to text in your email body. Spammers commonly have a high ratio of clickable images within their emails.
  • HTML Image to Text Ratio – We check to see the ratio of images in your email versus text. SpamAssassin suggests a ratio of 60% text (400 character minimum) to 40% images.
  • HTML Obfuscation – We check to see if the HTML in your email body has been modified or concealed. This is a common technique used by spammers to obfuscate text.
  • HTML Font – We check to see if the text within your email is readable based on the color contrast. We also check if you have any oversized text. Spammers typically use font sizes that are too large for their message body.
  • HTML Tags – We check to see if the HTML tags in your email are properly nested. Improper nesting of HTML tags can lead to accessibility and rendering issues.
  • HTML Elements – We check to see if the HTML in your email body contains any non-standard or deprecated elements.
  • HTML Embed – We check to see if the HTML in your email body contains any type of embedded plugins such as iframes. Spammers are known to use embedded plugins more often.
  • HTML URL Sizes – We check to see if any links include very large URLs. Spam filters may flag these links because very long links are more commonly used by spammers.
  • HTML Link Count – We check to see if the message body contains a very high count of links. Spam filters may flag an email because actual spam messages tend to have are large number of links compared to legitimate emails.

MailGenius Tips and Tricks

Use background-color and color attributes for all of your text elements to avoid being flagged by SpamAssassin for HTML_FONT_LOW_CONTRAST.

Additional Resources