HTML Fails: What No One
Tells You About Email HTML
| 2
Today’s Webinar Presenter
Kate McDonough
Campaign Manager at PostUp
•
Worked with various ESPs:
Constant Contact, Campaign Monitor,
ExactTarget, Distribion
•
Questions from today’s webinar will
be held at the end.
| 3
Today’s Agenda
Some basic tips and pitfalls to avoid:
•
The Anatomy of an Email
•
DOCTYPES
•
Table Properties
•
Tags and Capitalization
•
Alt Text & Which Clients Display Images by Default
•
Misuse of <center> and <br> Tags
| 4
| 5
The Anatomy of an Email
•
All emails have a basic skeletal structure
•
Ignoring the structure and misplacing the ‘bones’
can lead to rendering problems
•
Not all elements of the skeleton must be used, but
they should be in the same order
| 6
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 7
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 8
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 9
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 10
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 11
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 12
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 13
The Anatomy of an Email
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>This is the title of your document, when viewed as a webpage some browsers will show this</title>
<style type="text/css"> * { padding: 0px; border: none; line-height: normal; outline: none; list-style: none; -webkit-text-size-adjust: none; } </style> </head>
<body marginwidth="0" marginheight="0" style="width: 100% !important;-webkit-text-size-adjust: 100%; -ms-text-!important;-webkit-text-size-adjust: 100%; -webkit-font-smoothing: antialiased; " offset="0" topmargin="0" leftmargin="0" bgcolor="#ffffff">
| 14
| 15
Why Use a DOCTYPE?
•
DOCTYPES should be used in all emails and be
placed before the <html> tag
•
Some web clients will strip out the DOCTYPES
•
Subtle differences in how email clients render
HTML emails with different DOCTYPES
| 16
The Best DOCTYPE for Email
•
XHTML 1.0 transitional:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML
1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| 17
Effects of Not Having a DOCTYPE
•
No DOCTYPES = no paragraph margin
•
This can be seen in clients like:
–
Gmail
–
Apple Mail
–
iPad
–
iPhone
| 18
Effects of Not Having a DOCTYPE
•
No DOCTYPES =
–
Some special characters not supported
–
Problems in IE browsers with rendering margins and
| 19
| 20
Not Setting Table Properties
•
Specifically “cellpadding” and “cellspacing”
•
Why this matters:
–
Affects the alignment of your email
–
“Breaks” with multiple tables
–
If not set to “0” Outlook will add 2 pixels of padding
| 21
Not Setting Table Properties
| 22
| 23
| 24
Capitalizing Tags
•
Emails are in XHTML format
•
Case sensitive, requires all tags to be lowercase
•
Capitalized tags should be kept to web design
only
| 25
| 26
Not Including Alt Text
•
Spam filters & scoring
•
Alt text can function as
CTAs for emails that
are image heavy
| 27
Not Including Alt Text
| 28
Not Including Alt Text
| 29
Not Including Alt Text
| 30
| 31
Using the Tag <center> to Center-Align
•
Commonly used to center
align text
•
<center> can display
differently in certain browsers
•
Purely presentational rather
than structural
| 32
| 33
Using the Tag <center> to Center-Align
BEFORE
AFTER
<center>
<table border="0" cellpadding="0"
cellspacing="0" bgcolor="#EBEBEB">
<tr>
<td align="center">
<table>
…content…
</table>
</td>
</tr>
</table>
</center>
<table border="0" cellpadding="0"
cellspacing="0" bgcolor="#EBEBEB“
align="center">
<tr>
<td align="center">
<table>
…content…
</table>
</td>
</tr>
</table>
| 34
Misuse of the Break <br /> Tag
•
Written multiple ways:
–
<br>
–
<br/>
–
<br />
•
Preferred variation is <br />. If your doctype is
specified using HTML you can use the <br> tag. In
XHTML, you must close the tag with a final slash (e.g.
<br />)
•
Most emails use XHTML
Using break tags;
–
in place of rows with fixed heights
| 35
| 36
Copying & Pasting from a Microsoft
Product
•
Never keep your HTML in a
Word doc
•
Never copy and paste from
a Microsoft Product
•
Copying and pasting from a
Microsoft program can
cause damage
•
Microsoft products embed
unseen code
| 37
Copying & Pasting from a Microsoft
Product
| 38