Friday, December 1, 2023
HomeEmail MarketingThe Code Overview Course of for HTML Emails

The Code Overview Course of for HTML Emails


Magnifying glass examines email code

“Have you ever checked it in Outlook?”

It’s just like the phrase “have you ever turned it on once more/off once more” for electronic mail devs. Regardless of what number of instances you examine photographs, alt textual content, responsiveness, and fallbacks…one thing will get funky in a single electronic mail shopper or one other. 

Not like internet growth, HTML electronic mail growth exists on the whims of finicky electronic mail shoppers. Inconsistent assist (or random bugs launched by software program updates — belief me, I’ve been there) can derail templates and one-off campaigns. 

That’s why it’s so necessary to have an outlined electronic mail code evaluate course of. With so many shifting items for a given electronic mail marketing campaign, you wish to have peace of thoughts that you just’re dotting your i’s and crossing your t’s, metaphorically talking.

We put collectively this complete guidelines we use for each single marketing campaign Sinch E mail on Acid sends. Learn on or you’ll be able to obtain a free digital or printable model on your desk.

Soar to a bit on this article:

  1. The fundamental checks
  2. Is the e-mail optimized for cellular?
  3. How clear is your electronic mail code?
  4. Do you may have fallbacks in place?
  5. Did you examine the e-mail code for accessibility?
  6. Is the e-mail code optimized for darkish mode?
  7. Instruments to streamline electronic mail code evaluate
  8. Obtain the free guidelines

What to examine throughout the electronic mail code evaluate course of

Quick reply: All the things.

It doesn’t matter what number of instances you’ve used the template earlier than, or what number of emails you’ve despatched. Check all the pieces, each time, particularly with regards to code growth. Whatever the message, design, or kinds, it’s as much as you to ensure your emails are readable regardless of the place your viewers is opening them. 

These checks are additionally sensible to comply with in the event you’re conducting an electronic mail advertising and marketing audit that features an electronic mail code evaluate.

email code review checklist thumbnail

Get your electronic mail code evaluate guidelines

Wish to refer again to this record? We’ve bought you. Seize an interactive PDF of our electronic mail code evaluate guidelines to ensure you’ve coated all of your bases earlier than launching the subsequent marketing campaign.

Right here’s what it is best to all the time examine throughout the electronic mail code evaluate course of:

1. The fundamentals checks

First, do a fast rundown of the fundamentals. Begin on the high, naturally, with the header code, to ensure you’ve bought the proper DOCTYPE, language settings, in addition to meta tags set for responsiveness, darkish mode, and the right character set. This code not often modifications from electronic mail to electronic mail, however you by no means know if there’s a bizarre copy/paste factor happening.

E mail header code snippet

<!DOCTYPE html>
<html lang="en" dir="ltr" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:workplace:workplace">
<head>
  <meta charset="utf-8">
  <meta title="viewport" content material="width=device-width,initial-scale=1 user-scalable=sure">
  <meta title="format-detection" content material="phone=no, date=no, tackle=no, electronic mail=no, url=no">
  <meta title="x-apple-disable-message-reformatting">
  <meta title="color-scheme" content material="gentle darkish">
  <meta title="supported-color-schemes" content material="gentle darkish">
  <title>E mail title</title>
  <!--[if mso]>
  <noscript>
    <xml>
      <o:OfficeDocumentSettings>
        <o:PixelsPerInch>96</o:PixelsPerInch>
      </o:OfficeDocumentSettings>
    </xml>
  </noscript>
  <![endif]-->
  <model>
    :root {
      color-scheme: gentle darkish;
      supported-color-schemes: gentle darkish;
    }
  </model>
</head>

Discover a detailed clarification of the e-mail header over at GoodEmailCode.com.

Because the header code controls the remainder of the e-mail, it’s essential to ensure all the pieces is appropriate there first. That additionally consists of:

  • Ensuring the e-mail is the right width (not more than 700px max)
  • The code doesn’t seek advice from an exterior CSS model sheet
  • There’s no unsupported parts, like javascript or iframes
  • Kinds conform to electronic mail code requirements, reminiscent of utilizing 6-digit vs. 3-digit hex codes for colours
  • Photographs are optimized for prime resolutions shows

That is additionally the place you’ll be able to ensure you’ve coded your tables and ghost tables appropriately in Outlook. And don’t neglect to examine different frequent Outlook rendering points like undesirable white traces, background photographs, and alignment points when utilizing columns.

It’s the traditional 80/20 rule at play right here: You’ll doubtless spend 80% of your time solely 20% of your shoppers, and Outlook is essentially the most problematic shopper you’ll run into…however you need to work with it, as a result of it’s nonetheless the third hottest electronic mail shopper on the market.

2. Is the e-mail code optimized for cellular?

On common, People examine their telephones 344 instances per day. With over 6 billion cellular customers on the planet, the second most necessary examine you can also make is to substantiate your electronic mail renders appropriately not simply on desktop shoppers, however on cellular ones, too.

Whether or not you’re utilizing mobile-friendly, responsive, or fluid hybrid electronic mail design, you’ll wish to examine:

  • Button top of at the least 44px
  • Proper font measurement for readability
  • Columns and stacking work appropriately

Code snippet for a min-max width question:

@media solely display screen and (min-width: 400px) and (max-width: 600px)  {...}

3. How clear is your electronic mail code?

While you’re constructing on older emails or re-using templates, electronic mail code can get messy actually rapidly. That’s since you typically need to create workarounds or hacks for particular electronic mail shoppers or performance.

But it surely’s necessary to ensure you’re streamlining your electronic mail code as a lot as attainable. Pointless code weighs down your emails and will increase the scale, making them slower to load. Purchasers like Gmail clip emails at 102 kb, so maintain that in thoughts.

Message clipping in a Gmail email

You’ll wish to clear up spacing, padding, and your tables to ensure all the pieces works correctly, too. There are a couple of instruments on the market that may enable you consolidate your code to lower the file measurement. I take advantage of E mail Comb or Parcel to take away unused CSS.

Get some recommendation from Parcel founder, Avi Goldman, on methods to stop Gmail clipping.

4. Do you may have fallbacks in place?

At this time’s emails are extra personalised and customised than ever earlier than, and which means complications for electronic mail devs. Fallbacks act as placeholders when information isn’t accessible or supported. For instance, there are font fallbacks (aka font stacks) in the event you’re utilizing a customized font that an electronic mail shopper doesn’t assist. 

Instance code snippet for a font stack

A sans-serif inline model font-stack may appear like this:

model=”font-family: Helvetica, Arial, sans-serif;”

You wish to double-check that you’ve got fallbacks in place so even when one thing isn’t supported, your viewers can nonetheless have interaction along with your electronic mail:

  • Animations or different dynamic content material: Whereas most shoppers at the moment assist GIFs, it’s nonetheless necessary to ensure any animations you’re working with have a nonetheless picture that you would be able to present as a substitute.
  • Personalization fallbacks: Nobody desires to obtain, ‘Hey, $%firstname%$’! Be sure you have copy in place in case there isn’t a primary title on file, or no matter sort of personalization you’re working with.
  • Plain textual content model or a “View in browser” hyperlink: I’m nonetheless shocked how few manufacturers ship a plain textual content model alongside their HTML one. I all the time embody a “view in browser” hyperlink to ensure emails are accessible and it’s a last-chance fallback simply in case one thing goes bizarre with the HTML.

For some assist with interactivity and dynamic content material, take a look at a few of the interactive electronic mail fallback methods we advocate right here on our weblog.

5. Did you examine the e-mail code for accessibility?

In case your viewers can’t learn or work together along with your emails…then why do all that work? That’s on the core of electronic mail accessibility: ensuring each member of your viewers can truly obtain the contents of your message. This implies checking for:

  • Alt textual content on all photographs
  • Desk roles set appropriately (position=”presentation”) so display screen readers course of your code appropriately after they learn them
  • Utilizing semantic code, particularly <h> tags for headings and <p> tags for paragraphs, so display screen readers can differentiate between them
  • That darkish mode is working appropriately in all electronic mail shoppers and never washing out the kinds (we’ll discuss extra about this in a minute)

Code snippet for setting desk roles

<desk width="100%" border="0" cellpadding="0" cellspacing="0" model="width: 100%;" position="presentation">

Utilizing position=”presentation” ensures display screen readers interpret the e-mail as physique copy and never information within the desk.

For extra on all this, together with methods to use ARIA and code semantic HTML emails, examine our coding accessible emails.

6. Is the e-mail code optimized for darkish mode?

Darkish mode is among the latest additions to this guidelines, and one of the difficult. It’s turn out to be fairly well-liked — 44% of electronic mail entrepreneurs are contemplating the darker UX and one other 28% plan to start out making it a part of the e-mail manufacturing course of quickly. 

The factor about darkish mode is, if it really works, it seems to be nice. But when it doesn’t, your electronic mail is just about unreadable. Some shoppers flip the colours and others don’t present something in any respect. You wish to ensure you’ve coded darkish mode appropriately within the header code of your electronic mail and optimized textual content and background colour.

To ensure your emails work in darkish mode, examine that you just’re:

  • Utilizing clear PNGs
  • Utilizing media queries for darkish mode @media (prefers-color-scheme)
  • Focusing on Outlook.com darkish mode particularly [data-ogsc]

Get some darkish mode electronic mail code snippets that will help you develop campaigns for darker settings.

An amazing useful resource to take a look at in the event you’re unsure whether or not a shopper helps a coding method is supported or not is Can I E mail. And I’ve already talked about Parcel, which is a wonderful software for coding emails because it was constructed by an electronic mail developer for electronic mail builders.

The automated electronic mail guidelines from Sinch E mail on Acid is one other useful software, particularly for double-checking and finalizing electronic mail code earlier than you hit ship. 

Whereas the e-mail code evaluate course of looks as if loads, at this level, I not often even assume twice about these checks. That’s partially as a result of they’re constructed into the e-mail growth course of for each electronic mail we ship, and partially as a result of E mail on Acid takes care of a number of key checks robotically. 

Since you’ll be able to preview your work as many instances as wanted with E mail on Acid, you’ll be able to tinker along with your code till you’re 100% glad. That’s the fantastic thing about our limitless electronic mail testing.

email code review checklist thumbnail

Get your electronic mail code evaluate guidelines

Wish to refer again to this record? We’ve bought you. Seize an interactive PDF of our electronic mail code evaluate guidelines to ensure you’ve coated all of your bases earlier than launching the subsequent marketing campaign.



Writer: Megan Boshuyzen

Megan is a graphic designer turned electronic mail developer who’s labored on all features of electronic mail advertising and marketing. She believes good emails for good causes make a constructive distinction on this planet. Megan is at present working as an electronic mail developer for Sinch E mail. Go to her web site and be taught extra at megbosh.com.

Writer: Megan Boshuyzen

Megan is a graphic designer turned electronic mail developer who’s labored on all features of electronic mail advertising and marketing. She believes good emails for good causes make a constructive distinction on this planet. Megan is at present working as an electronic mail developer for Sinch E mail. Go to her web site and be taught extra at megbosh.com.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments