If you want to custom code your own HTML email, there are a few fundamental principles to keep in mind. 

Below, you'll learn about HTML email, and you'll find guidelines for creating your own HTML template in MailChimp.

In this article:

Multipart Email Delivery

What makes HTML email so hard for most people is not the designing and coding part, but delivering it properly. Even if your HTML email displays like you want in your own email program, some recipients aren't able to view HTML email in their email programs. In addition to your HTML, you need to send a plain-text alternative version of your message. When a recipient receives your email, their email program will automatically determine which format to display. 

Multipart/Alternative MIME format sends both the HTML and plain-text versions of an email. MailChimp automatically creates a plain-text version of a campaign, and also works alongside internet service providers (ISPs) and anti-spam groups to ensure the best delivery possible.

Fundamental Principles

  • Keep it simple.
    Focus on your message.
  • Post images on a publicly accessible web server. 
    Use absolute paths in your code to point to images. Make sure your images are posted on a publicly accessible server, so your recipients can see the images or download the files. Avoid free hosting sites, too, because these often have bandwidth limits that may prevent your images from displaying.
  • Use TABLES and SHIM.GIFs.
    Keep the code simple. All email programs use different methods to render HTML, like Internet Explorer, Microsoft Word, or their own proprietary renderer, so more high-level coding may not display as intended.
  • Don't code your emails too wide.
    Most people view messages in their preview panes, which are narrow and small. The templates we design at MailChimp are never more than 600 pixels wide, or they're fluid-width.
  • Test how it renders.
    Because all email programs render HTML differently, test your HTML email on different email programs. You can also use the MailChimp Inbox Inspector to test how your email renders in major programs.
  • Webmail services strip certain elements.
    Email services that are browser-based—like Gmail, Yahoo, Hotmail—strip out your DOCTYPE, BODY, and HEAD tags, so your code doesn't override theirs. Anything you'd normally code inside those tags (bgcolors, embedded CSS, JavaScript, background music files, etc.) are also stripped. Use inline CSS and FONT tags. MailChimp offers a CSS inliner tool to help with this. 
  • Think like a spam filter.
    Consider spam filters and spam firewalls when you code.

Email Open Tracking

Open-tracking functionality is built into email marketing solutions like MailChimp, so you don't have to do anything. But it helps to know how it works.

Opens are generally tracked by inserting a tiny, transparent graphic at the bottom of the message. When the tracker image is downloaded from the server after a recipient opens the email, it is counted as an open.

Because plain-text emails don't contain images, open tracking is handled differently. MailChimp lets you enable click-tracking in your plain-text emails, so when someone clicks a link in their plain-text email, we track that as an open and a click.

Use redirect scripts with click tracking. MailChimp automatically converts all links in your emails to point to our redirect scripts. When a recipient clicks your link, they're redirected from our server to your original URL, and we track the click. That helps us generate campaign reports that tell you which links your recipients clicked most.

List Management

Use good list-management practices to avoid being blacklisted by ISPs and anti-spam groups.

Here are a few tips for managing your email lists.

  • Don't send marketing emails unless the recipients gave you permission.
  • Some emails will bounce. There are two bounce types: a soft bounce means the recipient was temporarily unavailable, and a hard bounce means the email was undeliverable. Remove hard bounces immediately, because if you keep sending emails to a server after it has told you the email doesn't exist, they may block your future messages.
  • If an email soft bounces three campaigns in a row, it's best practice to clean it from your list. If you send daily emails, you may want to wait longer to see if the bounce reason is resolved.
  • Unsubscribe requests should be handled immediately.

If you set up a list in MailChimp, we'll manage it for you. You can customize the signup form and opt-in process to match your branding, or use our API to pass opt-in data directly from your website to MailChimp.

Was this article helpful?
What can we do to improve your experience with articles like this?
Thanks for submitting your feedback!
At this time, we are unable to reply to any responses, but we'll use this information to keep the site up-to-date.
Sorry, we were unable to submit your feedback. Please try again later. Thank you for your patience.

Related Articles