{"id":4950,"date":"2022-07-14T17:07:00","date_gmt":"2022-07-14T11:37:00","guid":{"rendered":"https:\/\/email.uplers.com\/blogs\/?p=4950"},"modified":"2024-05-21T18:16:03","modified_gmt":"2024-05-21T12:46:03","slug":"html-email-hacks-gmail","status":"publish","type":"post","link":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/","title":{"rendered":"Newer HTML Email Hacks Archive for Gmail"},"content":{"rendered":"\n<p>[This post was originally published on 18th Oct 2021. It has been updated on 14th July 2022.]<\/p>\n\n\n\n<p>We love all the nich\u00e8s involved in designing and coding your HTML emails. In the journey of coding over 60000+ emails, we, at Email Uplers, have made an observation.<\/p>\n\n\n\n<p>Not every email client is identical or consistent when it comes to displaying the same email across multiple devices.<\/p>\n\n\n\n<p>An HTML-rich email is like the new kid on the playground; not everyone shall play with it immediately. Some would readily welcome it (Apple Mail, Thunderbird), but others would require coaxing (Gmail, Outlook, Yahoo!) to arrive at amicable terms with it.<\/p>\n\n\n\n<p>In our first of the series, Email Uplers presents hacks &amp; workarounds for your Gmail HTML emails. Read our <a href=\"https:\/\/email.uplers.com\/blog\/step-step-guide-create-html-email\/\" target=\"_blank\" rel=\"noreferrer noopener\">Step by Step Guide to Create Your Own HTML Email<\/a><\/p>\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What Mischief Happens In Gmail?<\/strong><\/h2>\n\n\n\n<p>Is your HTML email not displaying properly in Gmail? As per Litmus\u2019 Email Client Market Share survey for March 2018, Gmail desktop &amp; Android hold 22% and 3% respectively in overall email client distribution. So it is very important that your emails render perfectly across both mediums taking into account the fact that the majority of your subscribers would invariably be Gmail users.<\/p>\n\n\n\n<p>Many Gmail Android users complain about receiving emails with squished images. A few others report observing unnecessary spaces between different sections in their emails.<br \/>While many issues of the past have been patched up in subsequent updates, some of the persistent common woes faced are:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Images disabled by default<\/li><li>Lack of inlining CSS support<\/li><li>No media query support<\/li><li>Float, margin, paragraph, and padding not supported<\/li><li>Gmail app on the iPhone turns phone numbers and dates automatically to blue<\/li><\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>HTML Email Hacks For Gmail<\/strong><\/h2>\n\n\n\n<p>Before you send a Gmail HTML email, keep the following hacks in mind to avoid getting in a pickle.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>1. Images Become Disproportionate in Gmail Android<\/strong><\/h3>\n\n\n\n<p>As a best practice while coding<a href=\"https:\/\/email.uplers.com\/blog\/background-images-emails\/\" target=\"_blank\" rel=\"noreferrer noopener\"> images in email<\/a>, an image is accommodated in a display block of half dimension to be displayed clearly in a retina display.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/gpZwZswrBHUxhG8cCJs9CfHpBJW4R3E93R-4OdUiuulDARXlwCqo78szXZeN66C4AtZqiDeqaLPNHtyv81eziCYmDpnvYlY0H9Yf2bTS5Oi8rGE_vcC2C7wKIFhV5-dwGM_jYwR7=s0\" alt=\"mailchimp image size-Retina\"\/><\/figure>\n\n\n\n<p>There is another glitch with Gmail Android App. We found that whenever the height of an image was specified in an email, the image failed to downscale properly in templates in Gmail. The following images are the proof of concept of the glitch occurring.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2021\/10\/image1.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"174\" height=\"300\" src=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2021\/10\/image1.jpg\" alt=\"demo-email-template\" class=\"wp-image-28185\" srcset=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2021\/10\/image1.jpg 174w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2021\/10\/image1-81x140.jpg 81w\" sizes=\"auto, (max-width: 174px) 100vw, 174px\" \/><\/a><\/figure>\n\n\n\n<p><strong>Reason behind this glitch<\/strong><\/p>\n\n\n\n<p>Unfortunately, Gmail is removing any height specified in the media queries and automatically inheriting the height from the desktop layout. This way when the image is viewed in Gmail Android, it has the width as per the screen size, but its height is that specified for the desktop layout.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/lh4.googleusercontent.com\/F86HGiMgxHVNrDohbQt285Kh9JdprW0NofXVqdvkLzDOxhUIW-aDkQDssvMo9cIpnBUozryq2WTdOzyqzHJymX3bpIg-5xLiVPcsGZgEat9eqxxvCbl0xS_GJuf6fEdsXVFcDWYi=s0\" alt=\"Demo-Email-Layout\"\/><\/figure>\n\n\n\n<p><strong>Solution: What do You do<\/strong><\/p>\n\n\n\n<p>While there is no specific workaround for this currently, here are some quick fixes that can help avert this problem and optimize your<strong> <\/strong>Gmail HTML emails<strong>.<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Don\u2019t specify the height for images in the mobile layout<\/li><li>For any spacer you want to use, make use of cell-padding property<\/li><\/ol>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>2. Responsive emails not rendered on third-party apps<\/strong><\/h3>\n\n\n\n<p>Since Gmail strips away media queries from email, <a href=\"https:\/\/email.uplers.com\/email-template-production-services\/\" target=\"_blank\" rel=\"noreferrer noopener\">responsive emails<\/a> need to be coded without media queries. Such layouts are known as Spongy. Look at the following code snippet for further clarity.&nbsp;<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">@media only screen and (max-width: 480px)\n\n{\n\n   .hide {display:none !important;}\n\n}\n\n&lt;table cellpadding=\u201d0\u2033 cellspacing=\u201d0\u2033 border=\u201d0\u2033 class=\u201dhide\u201d>\n\n&lt;tr>\n\n    &lt;td height=\u201d1\u2033 class=\u201dhide\u201d style=\u201dmin-width:700px; font-size:0px;\n\nline-height:0px;\u201d>\n\n        &lt;img height=\u201d1\u2033 src=\u201dspacer.gif\u201d style=\u201dmin-width: 700px; \n\ntext-decoration: none; border: none;\u201d \/>\n\n    &lt;\/td>\n\n&lt;\/tr>\n\n&lt;\/table><\/code><\/pre><\/div><\/div>\n\n\n\n<p>If you code it without media queries and then use media queries to further enhance the layout for a native app, the resulting outcome is called Hybrid Emails.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"504\" height=\"413\" src=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2022\/07\/hybrid-email.gif\" alt=\"Hybrid email\" class=\"wp-image-32507\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>3. Gmail App bumps up the font size to as much as 50%<\/strong><\/h3>\n\n\n\n<p>In Gmail mobile, sometimes Gmail automatically increases your font size to as much as 50% depending on screen width. This may increase readability but it ruins the overall layout of your templates in Gmail (and nobody likes that). To avoid this fate, you can practice the following 4 techniques while you create a HTML email in Gmail.<\/p>\n\n\n\n<p>a) Use display:none (add this to your CSS)<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;div style=\u201ddisplay: none; line-height: 0; color: #ffffff;\u201d>\n\nHello World!\n\n&lt;\/div><\/code><\/pre><\/div><\/div>\n\n\n\n<p>b) Use white-space: nowrap<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;div style=\u201dwhite-space: nowrap; line-height: 0; color: #ffffff;\u201d>\n\nHello World!\n\n&lt;\/div><\/code><\/pre><\/div><\/div>\n\n\n\n<p>c) Use a spacer image<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;tr class=\u201dem_dn\u201d>\n\n    &lt;td>\n\n      &lt;table cellpadding=\u201d0\u2033 cellspacing=\u201d0\u2033 border=\u201d0\u2033 align=\u201dcenter\u201d width=\u201d600\u2033>\n\n        &lt;tr>\n\n          &lt;td cellpadding=\u201d0\u2033 cellspacing=\u201d0\u2033 border=\u201d0\u2033 height=\u201d1\u2033; style=\u201dline-height: 1px; min-width: 600px;\u201d>\n\n            &lt;img src=\u201dspacer.gif\u201d width=\u201d600\u2033 height=\u201d1\u2033 style=\u201ddisplay: block; max-height: 1px; min-height: 1px; min-width: 600px; width: 600px;\u201d\/>\n\n            &lt;\/td>\n\n          &lt;\/tr>\n\n      &lt;\/table>\n\n    &lt;\/td>\n\n  &lt;\/tr><\/code><\/pre><\/div><\/div>\n\n\n\n<p>d) Use a div and &amp;nbsp together<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;div class=\u201dem_dn\u201d style=\u201dfont:20px courier; color:#ffffff; \n\nbackground-color:#ffffff;\u201d>\n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \n\n&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\n\n&lt;\/div><\/code><\/pre><\/div><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n<div class=\"banner_wrapper\" style=\"\"><div class=\"banner  banner-26416 bottom vert custom-banners-theme-default_style\" style=\"\"><a class=\"custom_banners_big_link\"  target=\"_blank\"  href=\"https:\/\/order.uplers.com\/uplers\/order\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"192\" src=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1.jpg\" class=\"attachment-full size-full\" alt=\"\" srcset=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1.jpg 768w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1-300x75.jpg 300w, https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2020\/01\/Email-template-production-768x192-1-624x156.jpg 624w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/div><\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>4. Gmail hides ima<\/strong><strong>ges by default<\/strong><\/h3>\n\n\n\n<p>Email Uplers won\u2019t categorize this as a major deal-breaker. This is because nearly <a href=\"https:\/\/litmus.com\/blog\/gmail-data-analysis-reveals-image-blocking-affects-43-of-emails\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">43% of Gmail users<\/a> read their emails without having images on them.&nbsp; The best course of action here is to include proper alt text in your Gmail HTML template for such scenarios with proper text-align. But ensure that when images don\u2019t load, they don\u2019t leave large, empty placeholders in their place by using display:none.<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">td[class=em_hide], table[class=em_hide], span[class=em_hide], br[class=em_hide]\n\n{\n\n      display:none !important;\n\n}<\/code><\/pre><\/div><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>5. Gmail styles links as blue and they are underlined by default<\/strong>&nbsp; <\/h3>\n\n\n\n<p>Templates in Gmail<strong> <\/strong>don\u2019t support black, #00, or #000000 and replaces them with default link color&nbsp; (i.e. #1155CC). So in order to prevent links from being blue and underlined in your Gmail <a href=\"https:\/\/email.uplers.com\/first-email-template-free\/\" target=\"_blank\" rel=\"noreferrer noopener\">HTML email templates<\/a><strong>,<\/strong> you need to add the following style tag.<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;a href=\u201chttps:\/\/emailweb.com\u201d style=\u201dtext-decoration:none; \n\ncolor:#00001b\u201d>emailweb\n\n&lt;\/a><\/code><\/pre><\/div><\/div>\n\n\n\n<p>\u2018text-decoration:none\u2019 removes the underline and \u2018#00001b\u2019 can replace any color code.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>6. External CSS styles are stripped away<\/strong><\/h3>\n\n\n\n<p>Templates in Gmail strip away any CSS that is not inlined. ESPs such as Campaign Monitor and Mailchimp help you inline your CSS or allow you to inline your CSS while coding itself. Check out why <a href=\"https:\/\/email.uplers.com\/blog\/inline-css-in-html-emails\/\" target=\"_blank\" rel=\"noreferrer noopener\">inlining CSS in your emails<\/a> is an important coding practice.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>7. Custom Web-font Support<\/strong><\/h3>\n\n\n\n<p>Ironically, Google hosts a custom font library but Gmail HTML email templates don\u2019t support the inclusion of custom web fonts. It is better to provide appropriate fallback fonts while experimenting with custom web fonts in your Gmail HTML templates. Want to know what conditions to look into while choosing fallback fonts? We\u2019ve already covered it over <a href=\"https:\/\/email.uplers.com\/blog\/significant-web-safe-fonts\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>8. There is a white space below an image<\/strong>&nbsp;<\/h3>\n\n\n\n<p>This can be totally avoided in your<strong> <\/strong>email templates for GMAIL&nbsp; by adding a \u2018display:block\u2019 inside your image source code. The following code snippet illustrates the same.<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;td style=\u201dpadding: 0px; margin: 0px; font-size:16px; font-weight:bold;\u201d>\n\n&lt;img src=\u201dxyz.jpg\u201d width=\u201d600\u2033 height=\u201d217\u2033 border=\u201d0\u2033 style=\u201ddisplay:block;\n\npadding: 0px; margin: 0px;\u201d \/>\n\n&lt;\/td><\/code><\/pre><\/div><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>9. Gmail doesn\u2019t support &lt;style&gt; or &lt;link&gt; in the &lt;head&gt;<\/strong>&nbsp;<\/h3>\n\n\n\n<p>This is hands down among the most frustrating limitations in this list. Gmail basic HTML<strong> <\/strong>templates ignore any style or link tags specified in the head section.&nbsp; Hence, you need to overwrite the default link color by adding a color style to each and every &lt;a&gt; within the email body.<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;a href=\u201dhttps:\/\/emailweb.com \u201d target=\u201d_blank\u201d  style=\u201dcolor:#ffffff; \n\nline-height:32px; text-decoration:none; display:block; \n\nbackground-color:#e25b46;\u201d>\n\nView Infographic\n\n&lt;\/a><\/code><\/pre><\/div><\/div>\n\n\n\n<p><em>Placement of &lt;style&gt; tag is a very important point to be considered when following a <\/em><strong><em>step-by-step guide to building email templates<\/em><\/strong><em>.<\/em><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>10. Float, margin, paragraph, and padding are not supported<\/strong><\/h3>\n\n\n\n<p>It is best to stick to basic nested table based layout with each TD tag carrying the margin and padding while developing<strong> <\/strong>email templates for Gmail.<\/p>\n\n\n\n<div class=\"dm-code-snippet dark dm-normal-version no-background no-background-mobile\" snippet-height=\"\" style=\"background-color:#abb8c3\"><div class=\"control-language\"><div class=\"dm-buttons\"><div class=\"dm-buttons-left\"><div class=\"dm-button-snippet red-button\"><\/div><div class=\"dm-button-snippet orange-button\"><\/div><div class=\"dm-button-snippet green-button\"><\/div><\/div><div class=\"dm-buttons-right\"><a id=\"dm-copy-raw-code\"><span class=\"dm-copy-text\">Copy Code<\/span><span class=\"dm-copy-confirmed\" style=\"display:none\">Copied<\/span><span class=\"dm-error-message\" style=\"display:none\">Use a different Browser<\/span><\/a><\/div><\/div><pre class=\" line-numbers\"><code id=\"dm-code-raw\" class=\" no-wrap language-markup\">&lt;table width=\u201d100%\u201d border=\u201d0\u2033 cellspacing=\u201d0\u2033 cellpadding=\u201d0\u2033 align=\u201dcenter\u201d>\n &lt;tr>\n  &lt;td align=\u201dright\u201d width=\u201d3\u2033 valign=\u201dbottom\u201d style=\u201dline-height:0px; font-size:0px;\u201d>\n  &lt;img src=\u201dimages\/cuv3.jpg\u201d width=\u201d3\u2033 height=\u201d3\u2033 alt=\u201d \u201d border=\u201d0\u2033 style=\u201ddisplay:block;\u201d \/>\n  &lt;\/td>\n&lt;\/tr>\n &lt;\/table><\/code><\/pre><\/div><\/div>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>11. Gmail merges emails with the same subject line<\/strong>&nbsp;<\/h3>\n\n\n\n<p>This is associated less with end-users and more with the testing of emails. Never test emails with the same \u2018from\u2019 address and subject line on the Gmail app, since Gmail merges the same email thread, and that would try to render the text from the first email in the thread and break the layout.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>12. Gmail is very fussy while parsing embedded styles&nbsp;<\/strong><\/h3>\n\n\n\n<p>If you\u2019re wondering just how finicky Gmail can be, get this- should it encounter even a single error, it\u2019ll get rid of your entire style block. An easy workaround to this issue is to use multiple style blocks. That way, you have the liberty of placing style blocks that are Gmail safe in the top block. Moreover, Gmail also throws away your block, if it exceeds 8192 characters.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>13. Gmail lets recipients download large and unlinked images&nbsp;<\/strong><\/h3>\n\n\n\n<p>If your image is large and is not wrapped with a URL, Gmail will overlay an icon over it, allowing its recipients to download it. This is something that greatly infuriates designers because by doing so Gmail directly interferes with the email template layout. If you want to avoid this, ensure that when your images are larger than 300*150, they\u2019re linked. You can even have a look at a few<a href=\"https:\/\/email.uplers.com\/portfolio\/\" target=\"_blank\" rel=\"noreferrer noopener\"> email template examples<\/a> for better clarity.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>14. Gmail converts URLs and phone numbers to links by default&nbsp;<\/strong><\/h3>\n\n\n\n<p>The moment Gmail encounters a URL or a phone number, it immediately inserts an anchor link around it. This is common to both its desktop and mobile versions. To prevent this, add an arbitrary HTML entity to your phone number that Gmail will fail to detect, something like \u201c#89&amp;\u201d.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Wrapping it Up<\/strong><\/h2>\n\n\n\n<p>In addition to the above issues which have workarounds, there are many others that still are unable to be bypassed in Gmail basic HTML templates such as:<\/p>\n\n\n\n<p><strong>PARTIAL\/NO SUPPORT<\/strong> :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Background-position<\/li><li>Descendant-selectors<\/li><li>Margin<\/li><li>Padding<\/li><\/ul>\n\n\n\n<p><strong>(Aesthetic)<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Background-position a:hover<\/li><li>Border<\/li><li>Font inheritance<\/li><li>List-style-image<\/li><li>No support for background images in non-Google accounts<\/li><\/ul>\n\n\n\n<p>Coding email templates for Gmail is no ordinary feat and requires you to keep a multitude of things in mind to be able to come up with the perfect Gmail basic HTML<strong> <\/strong>template.<\/p>\n\n\n\n<p>Email Uplers is hopeful for some miracles. Have you come across any issues other than those stated here? We\u2019d love to hear from you!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Want to overcome common rendering challenges in Gmail? Read this article to find out how!<\/p>\n","protected":false},"author":1,"featured_media":10542,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[382],"tags":[203,533],"class_list":["post-4950","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-email-coding","tag-email-design-hacks","tag-html-email-hacks"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>New HTML Email Hacks Archive For Gmail<\/title>\n<meta name=\"description\" content=\"Struggling to get your templates rendered flawlessly on Gmail? These HTML email hacks will save the day for you. Read More Here.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"New HTML Email Hacks Archive For Gmail\" \/>\n<meta property=\"og:description\" content=\"Struggling to get your templates rendered flawlessly on Gmail? These HTML email hacks will save the day for you. Read More Here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/\" \/>\n<meta property=\"og:site_name\" content=\"Email Uplers\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/email.uplers\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-14T11:37:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-21T12:46:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"540\" \/>\n\t<meta property=\"og:image:height\" content=\"198\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kevin George\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@email_uplers\" \/>\n<meta name=\"twitter:site\" content=\"@email_uplers\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kevin George\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/\",\"url\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/\",\"name\":\"New HTML Email Hacks Archive For Gmail\",\"isPartOf\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg\",\"author\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/7ffa431167e8be5eb07b050cd5c663fa\"},\"description\":\"Struggling to get your templates rendered flawlessly on Gmail? These HTML email hacks will save the day for you. Read More Here.\",\"breadcrumb\":{\"@id\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#primaryimage\",\"url\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg\",\"contentUrl\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg\",\"width\":\"1170\",\"height\":\"428\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/email.uplers.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Newer HTML Email Hacks Archive for Gmail\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/email.uplers.com\/blog\/#website\",\"url\":\"https:\/\/email.uplers.com\/blog\/\",\"name\":\"Email Uplers\",\"description\":\"Email Marketing Blog\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/email.uplers.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/7ffa431167e8be5eb07b050cd5c663fa\",\"name\":\"Kevin George\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2019\/03\/Img-96x96.png\",\"contentUrl\":\"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2019\/03\/Img-96x96.png\",\"caption\":\"Kevin George\"},\"description\":\"Kevin is the Head of Marketing at Email Uplers, one of the fastest-growing full-service email marketing companies. He is an email enthusiast at heart and loves to pen down email marketing content. You can reach him at kevin.g@uplers.com or connect with him on LinkedIn.\",\"sameAs\":[\"https:\/\/www.linkedin.com\/in\/kevin-george-email\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"New HTML Email Hacks Archive For Gmail","description":"Struggling to get your templates rendered flawlessly on Gmail? These HTML email hacks will save the day for you. Read More Here.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/","og_locale":"en_US","og_type":"article","og_title":"New HTML Email Hacks Archive For Gmail","og_description":"Struggling to get your templates rendered flawlessly on Gmail? These HTML email hacks will save the day for you. Read More Here.","og_url":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/","og_site_name":"Email Uplers","article_publisher":"https:\/\/www.facebook.com\/email.uplers\/","article_published_time":"2022-07-14T11:37:00+00:00","article_modified_time":"2024-05-21T12:46:03+00:00","og_image":[{"url":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg","width":540,"height":198,"type":"image\/jpeg"}],"author":"Kevin George","twitter_card":"summary_large_image","twitter_creator":"@email_uplers","twitter_site":"@email_uplers","twitter_misc":{"Written by":"Kevin George","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/","url":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/","name":"New HTML Email Hacks Archive For Gmail","isPartOf":{"@id":"https:\/\/email.uplers.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#primaryimage"},"image":{"@id":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#primaryimage"},"thumbnailUrl":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg","author":{"@id":"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/7ffa431167e8be5eb07b050cd5c663fa"},"description":"Struggling to get your templates rendered flawlessly on Gmail? These HTML email hacks will save the day for you. Read More Here.","breadcrumb":{"@id":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#primaryimage","url":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg","contentUrl":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2018\/04\/Gmail-Rendering-Hack.jpg","width":"1170","height":"428"},{"@type":"BreadcrumbList","@id":"https:\/\/email.uplers.com\/blog\/html-email-hacks-gmail\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/email.uplers.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Newer HTML Email Hacks Archive for Gmail"}]},{"@type":"WebSite","@id":"https:\/\/email.uplers.com\/blog\/#website","url":"https:\/\/email.uplers.com\/blog\/","name":"Email Uplers","description":"Email Marketing Blog","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/email.uplers.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/7ffa431167e8be5eb07b050cd5c663fa","name":"Kevin George","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/email.uplers.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2019\/03\/Img-96x96.png","contentUrl":"https:\/\/email.uplers.com\/blog\/wp-content\/uploads\/2019\/03\/Img-96x96.png","caption":"Kevin George"},"description":"Kevin is the Head of Marketing at Email Uplers, one of the fastest-growing full-service email marketing companies. He is an email enthusiast at heart and loves to pen down email marketing content. You can reach him at kevin.g@uplers.com or connect with him on LinkedIn.","sameAs":["https:\/\/www.linkedin.com\/in\/kevin-george-email\/"]}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts\/4950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/comments?post=4950"}],"version-history":[{"count":80,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts\/4950\/revisions"}],"predecessor-version":[{"id":39645,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/posts\/4950\/revisions\/39645"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/media\/10542"}],"wp:attachment":[{"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/media?parent=4950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/categories?post=4950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/email.uplers.com\/blog\/wp-json\/wp\/v2\/tags?post=4950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}