Crafting an HTML Email Template

Sending emails to customers or leads is essential to the growth of your business. Although many email marketing platforms provide drag and drop email builders, they are confined to cookie cutter themes. This article will provide you with a customizable HTML email template.

Below is the HTML and CSS required to craft your own customized email template.

Step 1

Add the HTML below to where you are creating your email

<center>
<table align="center" border="0" cellpadding="0" cellspacing="0" height="100%" id="bodyTable" width="100%">
<tbody>
<tr>
<td align="center" id="bodyCell" valign="top">
<!-- BEGIN TEMPLATE // -->
<div class="__ma__postal_address">&nbsp;</div>
<table border="0" cellpadding="0" cellspacing="0" id="templateContainer">
<tbody>
<tr>
<td align="center" valign="top">
<!-- BEGIN BODY // -->
<table bgcolor="#ebebeb" border="0" cellpadding="0" cellspacing="0" class="ct-container" style="margin: auto; background-color:#000;" width="100%">
<tbody>
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" width="100%">
<tbody>
<tr>
<td bgcolor="#000000" height="40">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" width="100%">
<tbody>
<tr>
<td width="15">&nbsp;</td>
<td>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;" width="100%">
<tbody>
<tr>
<td mc:edit="logo" style="padding-right:10px;"><a href="" target="_blank"><img alt="WebCorpCo Logo" src="https://www.solodev.com/assets/email/logo.png" style="width:80%;" /></a></td>
<td align="right">
<table align="center" bgcolor="#000000" border="0" cellpadding="0" cellspacing="0" style="border-collapse:collapse;">
<tbody>
<tr>
<td bgcolor="#000000" class="mobileHide" mc:edit="phone" style="font-family:Helvetica, Arial, sans-serif; font-size:16px; color:#ffffff; padding-left:5px; background-color: #000000;text-align: right;" width="188"><a href="tel:5555555555" style="color:#ffffff; text-decoration:none;">555.555.5555</a></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td width="15">&nbsp;</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="0" cellspacing="0" id="templateBody" width="100%">
<tbody>
<tr>
<td class="bodyContent" mc:edit="body_content00" valign="top">
<h1 style="color:#eb2123; font-size:40px;font-weight:bold;">Larger than Life Insights!</h1>
<h3 style="font-size:20px;color:#000000;font-weight:bold;">Leverage the power of Big Data with WebCorpCo</h3>
</td>
</tr>
<tr>
<td class="bodyContent" style="padding-top:0; padding-bottom:0;"><a href="" target="_blank"><img id="bodyImage" mc:allowtext="" mc:edit="body_image" mc:label="body_image" src="https://www.solodev.com/assets/email/email-image-blog-post.png" /></a></td>
</tr>
<tr>
<td class="bodyContent" mc:edit="body_content01" valign="top">
<p>Thank you for requesting our case study on how WebCorpCo uses its own Big Data products to leverage business intelligence. You are the 1,000,0721th person to read it! Congrats!</p>
<p>The most brilliant minds in Big Data, Data Mining, Pattern Analysis, Natural Language Processing, Recommender Systems, and Business Intelligence collaborated to bring you this report! Here it is, in all its glory!</p>
<p>We hope you enjoy the lessons to be gleaned from our case study and look forward to working with you hand in hand to bring business intelligence to the fold for your organization!</p>
</td>
</tr>
<tr>
<td>
<p style="text-align: center;"><a href="" mc:edit="button" target="_blank"><img style="margin-bottom: 30px;" src="https://www.solodev.com/assets/email/learn.jpg" /></a></p>
&nbsp;
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- // END BODY -->
</td>
</tr>
<tr>
<td align="center" valign="top">
<!-- BEGIN FOOTER // -->
<div mc:edit="socialicons" style="text-align: center;background-color: #000;padding-top: 40px;"><br />
<a href="" style="border:none;" target="_blank" title="Facebook"><img alt="Facebook" src="https://www.solodev.com/assets/email/facebook-email-icon.png" /></a> <a href="" style="border:none;" target="_blank" title="Twitter"> <img alt="Twitter" src="https://www.solodev.com/assets/email/twitter-email-icon.png" /></a> <a href="" style="border:none;" target="_blank" title="Linkedin"> <img alt="Linkedin" src="https://www.solodev.com/assets/email/linkedin-email-icon.png" /> </a>
</div>
<div mc:edit="footertext" style="text-align: center;background-color: #000;font-size:13px; padding-bottom: 40px;padding-top: 10px;padding-left:10px;padding-right:10px;color: #fff;">
<p><a href="" style="color: #eb2123;font-weight:bold;margin-bottom:10px;text-decoration:none;font-family:arial,sans-serif;" target="_blank">WebCorpCo</a></p>
<p><a href="" style="color: #fff;margin-bottom:10px;text-decoration:none;font-family:arial,sans-serif;" target="_blank">123 Easy Street | Orlando, Florida 32803</a></p>
<p style="color: #fff;margin-bottom:10px;text-decoration:none;font-family:arial,sans-serif;"><a href="tel:5555555555" style="color: #fff;margin-bottom:10px;text-decoration:none;font-family:arial,sans-serif;">Phone: 555.555.5555 </a></p>
<p style="color:#fff !important;font-family:arial,sans-serif;"><br />
Don&rsquo;t want to receive email Updates? <a href="" style="color:#eb2123 !important;font-family:arial,sans-serif;">Unsubscribe here</a><br />
<br />
&copy; 2016 WebCorpCo. All rights reserved.<br />
<br />
&nbsp;
</p>
</div>
<!-- // END FOOTER -->
</td>
</tr>
</tbody>
</table>
<!-- // END TEMPLATE -->
</td>
</tr>
</tbody>
</table>
</center>

Step 2

Add the CSS in between an opening and closing style tag above the HTML

.vcard a,
.vcard .adr {
color: #fff;
font-family: arial, sans-serif;
}
#outlook a {
padding: 0;
}
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass,
.ExternalClass p,
.ExternalClass span,
.ExternalClass font,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
}
body,
table,
td,
p,
a,
li,
blockquote {
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
table,
td {
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
}
img {
-ms-interpolation-mode: bicubic;
}
body {
margin: 0;
padding: 0;
}
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
}
table {
border-collapse: collapse !important;
}
body,
#bodyTable,
#bodyCell {
height: 100% !important;
margin: 0;
padding: 0;
width: 100% !important;
}
#bodyCell {
padding: 10px;
}
#templateContainer {
width: 600px;
}
body,
#bodyTable {
/*@editable*/
background-color: #ffffff;
}
#bodyCell {
/*@editable*/
border-top: 4px solid #BBBBBB;
}
#templateContainer {
/*@editable*/
border: 1px solid #BBBBBB;
}
h1 {
/*@editable*/
color: #eb2123 !important;
display: block;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 36px;
/*@editable*/
font-style: normal;
/*@editable*/
font-weight: bold;
/*@editable*/
line-height: 100%;
/*@editable*/
letter-spacing: normal;
margin-top: 30px;
margin-right: 0;
margin-bottom: 10px;
margin-left: 0;
/*@editable*/
text-align: center;
}
h2 {
/*@editable*/
color: #000000 !important;
display: block;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 20px;
/*@editable*/
font-style: normal;
/*@editable*/
font-weight: bold;
/*@editable*/
line-height: 100%;
/*@editable*/
letter-spacing: normal;
margin-top: 0;
margin-right: 0;
margin-bottom: 10px;
margin-left: 0;
/*@editable*/
text-align: left;
}
h3 {
/*@editable*/
color: #000000 !important;
display: block;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 17px;
/*@editable*/
font-style: normal;
/*@editable*/
font-weight: normal;
/*@editable*/
line-height: 100%;
/*@editable*/
letter-spacing: normal;
margin-top: 0;
margin-right: 0;
margin-bottom: 30px;
margin-left: 0;
/*@editable*/
text-align: center;
}
/*
@tab Page
@section heading 4
@tip Set the styling for all fourth-level headings in your emails. These should be the smallest of your headings.
@style heading 4
*/
h4 {
/*@editable*/
color: #808080 !important;
display: block;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 14px;
/*@editable*/
font-style: italic;
/*@editable*/
font-weight: normal;
/*@editable*/
line-height: 100%;
/*@editable*/
letter-spacing: normal;
margin-top: 0;
margin-right: 0;
margin-bottom: 10px;
margin-left: 0;
/*@editable*/
text-align: left;
}
/*
@tab Header
@section preheader style
@tip Set the background color and bottom border for your email's preheader area.
@theme header
*/
#templatePreheader {
/*@editable*/
background-color: #F4F4F4;
/*@editable*/
border-bottom: 1px solid #CCCCCC;
}
/*
@tab Header
@section preheader text
@tip Set the styling for your email's preheader text. Choose a size and color that is easy to read.
*/
.preheaderContent {
/*@editable*/
color: #808080;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 10px;
/*@editable*/
line-height: 125%;
/*@editable*/
text-align: left;
}
/*
@tab Header
@section preheader link
@tip Set the styling for your email's preheader links. Choose a color that helps them stand out from your text.
*/
.preheaderContent a:link,
.preheaderContent a:visited,
.preheaderContent a .yshortcuts {
/*@editable*/
color: #606060;
/*@editable*/
font-weight: normal;
/*@editable*/
text-decoration: underline;
}
/*
@tab Header
@section header style
@tip Set the background color and borders for your email's header area.
@theme header
*/
#templateHeader {
/*@editable*/
background-color: #F4F4F4;
/*@editable*/
border-top: 1px solid #FFFFFF;
/*@editable*/
border-bottom: 1px solid #CCCCCC;
}
/*
@tab Header
@section header text
@tip Set the styling for your email's header text. Choose a size and color that is easy to read.
*/
.headerContent {
/*@editable*/
color: #505050;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 20px;
/*@editable*/
font-weight: bold;
/*@editable*/
line-height: 100%;
/*@editable*/
padding-top: 0;
/*@editable*/
padding-right: 0;
/*@editable*/
padding-bottom: 0;
/*@editable*/
padding-left: 0;
/*@editable*/
text-align: left;
/*@editable*/
vertical-align: middle;
}
/*
@tab Header
@section header link
@tip Set the styling for your email's header links. Choose a color that helps them stand out from your text.
*/
.headerContent a:link,
.headerContent a:visited,
.headerContent a .yshortcuts {
/*@editable*/
color: #EB4102;
/*@editable*/
font-weight: normal;
/*@editable*/
text-decoration: underline;
}
#headerImage {
height: auto;
max-width: 600px;
}
/*
@tab Body
@section body style
@tip Set the background color and borders for your email's body area.
*/
#templateBody {
/*@editable*/
background-color: #ffffff;
/*@editable*/
border-top: 1px solid #FFFFFF;
/*@editable*/
border-bottom: 1px solid #CCCCCC;
}
/*
@tab Body
@section body text
@tip Set the styling for your email's main content text. Choose a size and color that is easy to read.
@theme main
*/
.bodyContent {
/*@editable*/
color: #505050;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 16px;
/*@editable*/
line-height: 150%;
padding-right: 30px;
padding-bottom: 30px;
padding-top: 30px;
padding-left: 30px;
/*@editable*/
text-align: left;
}
/*
@tab Body
@section body link
@tip Set the styling for your email's main content links. Choose a color that helps them stand out from your text.
*/
.bodyContent a:link,
.bodyContent a:visited,
.bodyContent a .yshortcuts {
/*@editable*/
color: #EB4102;
/*@editable*/
font-weight: normal;
/*@editable*/
text-decoration: underline;
}
.bodyContent img {
display: inline;
height: auto;
max-width: 560px;
}
.templateColumnContainer {
display: inline;
width: 260px;
}
/*
@tab Columns
@section column style
@tip Set the background color and borders for your email's column area.
*/
#templateColumns {
/*@editable*/
background-color: #F4F4F4;
/*@editable*/
border-top: 1px solid #FFFFFF;
/*@editable*/
border-bottom: 1px solid #CCCCCC;
}
/*
@tab Columns
@section left column text
@tip Set the styling for your email's left column content text. Choose a size and color that is easy to read.
*/
.leftColumnContent {
/*@editable*/
color: #505050;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 14px;
/*@editable*/
line-height: 150%;
padding-top: 0;
padding-right: 0;
padding-bottom: 20px;
padding-left: 0;
/*@editable*/
text-align: left;
}
/*
@tab Columns
@section left column link
@tip Set the styling for your email's left column content links. Choose a color that helps them stand out from your text.
*/
.leftColumnContent a:link,
.leftColumnContent a:visited,
.leftColumnContent a .yshortcuts {
/*@editable*/
color: #EB4102;
/*@editable*/
font-weight: normal;
/*@editable*/
text-decoration: underline;
}
/*
@tab Columns
@section right column text
@tip Set the styling for your email's right column content text. Choose a size and color that is easy to read.
*/
.rightColumnContent {
/*@editable*/
color: #505050;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 14px;
/*@editable*/
line-height: 150%;
padding-top: 0;
padding-right: 0;
padding-bottom: 20px;
padding-left: 0;
/*@editable*/
text-align: left;
}
/*
@tab Columns
@section right column link
@tip Set the styling for your email's right column content links. Choose a color that helps them stand out from your text.
*/
.rightColumnContent a:link,
.rightColumnContent a:visited,
.rightColumnContent a .yshortcuts {
/*@editable*/
color: #EB4102;
/*@editable*/
font-weight: normal;
/*@editable*/
text-decoration: underline;
}
.leftColumnContent img,
.rightColumnContent img {
display: inline;
height: auto;
max-width: 260px;
}
/*
@tab Footer
@section footer style
@tip Set the background color and borders for your email's footer area.
@theme footer
*/
#templateFooter {
/*@editable*/
background-color: #F4F4F4;
/*@editable*/
border-top: 1px solid #FFFFFF;
}
/*
@tab Footer
@section footer text
@tip Set the styling for your email's footer text. Choose a size and color that is easy to read.
@theme footer
*/
.footerContent {
/*@editable*/
color: #808080;
/*@editable*/
font-family: Helvetica;
/*@editable*/
font-size: 10px;
/*@editable*/
line-height: 150%;
padding-top: 20px;
padding-right: 20px;
padding-bottom: 20px;
padding-left: 20px;
/*@editable*/
text-align: left;
}
/*
@tab Footer
@section footer link
@tip Set the styling for your email's footer links. Choose a color that helps them stand out from your text.
*/
.footerContent a:link,
.footerContent a:visited,
.footerContent a .yshortcuts,
.footerContent a span {
/*@editable*/
color: #606060;
/*@editable*/
font-weight: normal;
/*@editable*/
text-decoration: underline;
}
@media only screen and (max-width: 480px) {
body,
table,
td,
p,
a,
li,
blockquote {
-webkit-text-size-adjust: none !important;
}
}
@media only screen and (max-width: 480px) {
body {
width: 100% !important;
min-width: 100% !important;
}
}
@media only screen and (max-width: 480px) {
#bodyCell {
padding: 10px !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section template width
@tip Make the template fluid for portrait or landscape view adaptability. If a fluid layout doesn't work for you, set the width to 300px instead.
*/
#templateContainer {
/*@tab Mobile Styles
@section template width
@tip Make the template fluid for portrait or landscape view adaptability. If a fluid layout doesn't work for you, set the width to 300px instead.*/
max-width: 600px !important;
/*@editable*/
width: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section heading 1
@tip Make the first-level headings larger in size for better readability on small screens.
*/
h1 {
/*@editable*/
font-size: 30px !important;
/*@editable*/
line-height: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section heading 2
@tip Make the second-level headings larger in size for better readability on small screens.
*/
h2 {
/*@editable*/
font-size: 20px !important;
/*@editable*/
line-height: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section heading 3
@tip Make the third-level headings larger in size for better readability on small screens.
*/
h3 {
/*@editable*/
font-size: 18px !important;
/*@editable*/
line-height: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section heading 4
@tip Make the fourth-level headings larger in size for better readability on small screens.
*/
h4 {
/*@editable*/
font-size: 16px !important;
/*@editable*/
line-height: 100% !important;
}
}
@media only screen and (max-width: 480px) {
#templatePreheader {
display: none !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section header image
@tip Make the main header image fluid for portrait or landscape view adaptability, and set the image's original width as the max-width. If a fluid setting doesn't work, set the image width to half its original size instead.
*/
#headerImage {
/*@tab Mobile Styles
@section header image
@tip Make the main header image fluid for portrait or landscape view adaptability, and set the image's original width as the max-width. If a fluid setting doesn't work, set the image width to half its original size instead.*/
height: auto !important;
/*@editable*/
max-width: 600px !important;
/*@editable*/
width: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section header text
@tip Make the header content text larger in size for better readability on small screens. We recommend a font size of at least 16px.
*/
.headerContent {
/*@editable*/
font-size: 20px !important;
/*@editable*/
line-height: 125% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section body image
@tip Make the main body image fluid for portrait or landscape view adaptability, and set the image's original width as the max-width. If a fluid setting doesn't work, set the image width to half its original size instead.
*/
#bodyImage {
/*@tab Mobile Styles
@section body image
@tip Make the main body image fluid for portrait or landscape view adaptability, and set the image's original width as the max-width. If a fluid setting doesn't work, set the image width to half its original size instead.*/
height: auto !important;
/*@editable*/
max-width: 560px !important;
/*@editable*/
width: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section body text
@tip Make the body content text larger in size for better readability on small screens. We recommend a font size of at least 16px.
*/
.bodyContent {
/*@editable*/
font-size: 18px !important;
/*@editable*/
line-height: 125% !important;
}
}
@media only screen and (max-width: 480px) {
.templateColumnContainer {
display: block !important;
width: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section column image
@tip Make the column image fluid for portrait or landscape view adaptability, and set the image's original width as the max-width. If a fluid setting doesn't work, set the image width to half its original size instead.
*/
.columnImage {
/*@tab Mobile Styles
@section column image
@tip Make the column image fluid for portrait or landscape view adaptability, and set the image's original width as the max-width. If a fluid setting doesn't work, set the image width to half its original size instead.*/
height: auto !important;
/*@editable*/
max-width: 260px !important;
/*@editable*/
width: 100% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section left column text
@tip Make the left column content text larger in size for better readability on small screens. We recommend a font size of at least 16px.
*/
.leftColumnContent {
/*@editable*/
font-size: 16px !important;
/*@editable*/
line-height: 125% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section right column text
@tip Make the right column content text larger in size for better readability on small screens. We recommend a font size of at least 16px.
*/
.rightColumnContent {
/*@editable*/
font-size: 16px !important;
/*@editable*/
line-height: 125% !important;
}
}
@media only screen and (max-width: 480px) {
/*
@tab Mobile Styles
@section footer text
@tip Make the body content text larger in size for better readability on small screens.
*/
.footerContent {
/*@editable*/
font-size: 14px !important;
/*@editable*/
line-height: 115% !important;
}
}
@media only screen and (max-width: 480px) {
.footerContent a {
display: block !important;
}
}

Step 3

Customize the email’s copy, header, and contact information

Demo on JSFiddle

Download from GitHub

Originally Posted here on the Solodev Web Design Blog

To learn more about the power of the Solodev Web Design Platform visit solodev.com/features/!
Brought to you by the Solodev Team. Solodev is a cloud-based web content management system that empowers users with the freedom to bring amazing web designs to life.