16
salesforce.com/marketingcloud
16
e Design Toolkit
Example C
<a href=”” alias=””
target=” _ blank”
style=”text-decoration:
underline;”></a>
Example D
<img alt=”” src=”spacer.
gif” width=”1”
height=”20” border=”0”
style=”display:block” />
Example E
<img style=”display:
block;” alt=”Salesforce
Marketing Cloud“
src=”http://image.jpg”
width=”20” height=”10” />
Example F
Use this:
<td align=”left”
style =”font-fa m ily: Arial,
Helvetica, sans-serif;
color: #000001;
fo nt-size: 20 px;”>
Instead of this:
<td align=”left”
style=”font: Arial,
Helvetica, sans-serif
#000001 20px;”>
Text, Links, Images, Videos, and Forms
• Use inline CSS to force links to display with or without an underline. See Example C.
• Use inline CSS to specify a link color other than default “web” blue.
• Block level elements such <p> and <h1> are stripped out or behave unexpectedly, which can
affect your layout. Enclose all text within <td> cells instead and use inline styles to control the text.
• Since some email clients block images by default, make sure important images contain an alt
attribute. Use alt tags on all images, even if you don’t want one displayed. If no alt tag is needed,
insert a blank tag: <img alt=”” src…> Alt should come before source (src) to aid with mobile
rendering on Blackberry. Include font, font size, and color properties in your <img> tag to style
your alt text.
• Set border=“0” in an img tag to prevent a blue border around linked images and add
style=“display: block;” to prevent rendering issues in Outlook.com and Gmail in Firefox.
See Example D.
• Use absolute URL references for the image path rather than relative paths. See Example E.
• Don’t rely on background images for primary content, but include them only as
secondary elements.
• To ensure usability in all environments, avoid rich media like Flash.
• Use animated GIFs knowing that only the first frame will display in Outlook 07/10/13. If video is
desired, show a screenshot of the video, linking to your website or other channels where it can
be easily played and tracked more robustly.
• Background images don’t render in Outlook 07/10/13 without a special code fix. If you use a
background image, treat it as a secondary design element, using an appropriate background
color to make sure any displayed text is legible (i.e., not white text on a white background).
• Image dimensions in HTML should match the actual image’s dimensions. If not,
image distortion and pixellation can occur. Additionally, inline sizing is ignored by
some older email clients, so this precaution will ensure consistent rendering.
• Avoid using shorthand in inline CSS. Be sure to use the full six digits for HEX color codes
(#000001 rather than #000) and avoid RGB colors. Write each CSS property separately instead
of combining them into one single shorthand declaration. See Example F.
• The hex code #000000 (black) on href tags is not recommended because some clients (primarily
Gmail) will override it with blue. To show black, use the hex code #000001, which appears
almost exactly the same.
Email Coding Fundamentals16 salesforce.com/marketingcloud