Skip to content

Instantly share code, notes, and snippets.

Last active October 21, 2016 16:44
Show Gist options
  • Save jitendravyas/8129ca09752ceb206fe81921708c9751 to your computer and use it in GitHub Desktop.
Save jitendravyas/8129ca09752ceb206fe81921708c9751 to your computer and use it in GitHub Desktop.
This to keep in HTML Email <head>
<!doctype html>
<!--[if IE]><html xmlns="" class="ie"><![endif]-->
<!--[if !IE]><!-->
<html style="margin: 0;padding: 0;" lang="en" xml:lang="en" xmlns="" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html;" charset="utf-8">
<!--[if !mso]><!-->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<!-- enable media queries for windows phone 8 -->
<meta name="robots" content="noindex,nofollow">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="format-detection" content="telephone=no">
<!-- disable auto telephone linking in iOS -->
<title>Email title</title>
* {
text-size-adjust: none;
-webkit-text-size-adjust: none;
-moz-text-size-adjust: none;
-ms-text-size-adjust: none;
-webkit-font-smoothing: antialiased;
body {
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
a {
color: inherit;
outline: none;
text-decoration: none;
td {
border-collapse: collapse !important;
mso-table-lspace: 0pt;
mso-table-rspace: 0pt;
img {
border: 0;
height: auto;
line-height: 100%;
outline: none;
text-decoration: none;
-ms-interpolation-mode: bicubic;
div[style*="margin: 16px 0"] {
margin: 0 !important;
/*Remove Blue Links on Apple Devices */
a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: none !important;
font-size: inherit !important;
font-family: inherit !important;
font-weight: inherit !important;
line-height: inherit !important;
* {
line-height: inherit;
[href^="sms"] {
color: inherit !important;
text-decoration: none !important;
.ReadMsgBody, .ExternalClass {
width: 100%;
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div {
line-height: 100%;
<!--[if !mso]><!-->
<style type="text/css">
@media only screen and (max-width:480px) {
@-ms-viewport {
width: 320px;
@viewport {
width: 320px;
<!--[if mso]>
<h1>Web Browsers</h1>
<p>Google Chrome, Firefox, and Internet Explorer are the most used browsers today.</p>
<h2>You are here:</h2>
<a href="#">Main</a>
<a href="#">Products</a>
<a href="#">Dishwashers</a>
<a>Second hand</a>
<main role="main">
<h2>Google Chrome</h2>
<img src="../images/HTML5_Logo.png" alt="HTML5 logo" width="128" height="128" />
<p>The concert took place on <time datetime="2001-05-15T19:00">May 15</time>.</p>
<footer>footer element</footer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment