HTML preprocessors can make writing HTML more powerful or convenient. For instance, Markdown is designed to be easier to write and read for text documents and you could write a loop in Pug.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. So you don't have access to higher-up elements like the <html>
tag. If you want to add classes there that can affect the whole document, this is the place to do it.
In CodePen, whatever you write in the HTML editor is what goes within the <body>
tags in a basic HTML5 template. If you need things in the <head>
of the document, put that code here.
The resource you are linking to is using the 'http' protocol, which may not work when the browser is using https.
CSS preprocessors help make authoring CSS easier. All of them offer things like variables and mixins to provide convenient abstractions.
It's a common practice to apply CSS to a page that styles elements such that they are consistent across all browsers. We offer two of the most popular choices: normalize.css and a reset. Or, choose Neither and nothing will be applied.
To get the best cross-browser support, it is a common practice to apply vendor prefixes to CSS properties and values that require them to work. For instance -webkit-
or -moz-
.
We offer two popular choices: Autoprefixer (which processes your CSS server-side) and -prefix-free (which applies prefixes via a script, client-side).
Any URL's added here will be added as <link>
s in order, and before the CSS in the editor. You can use the CSS from another Pen by using it's URL and the proper URL extention.
You can apply CSS to your Pen from any stylesheet on the web. Just put a URL to it here and we'll apply it, in the order you have them, before the CSS in the Pen itself.
You can also link to another Pen here (use the .css
URL Extension) and we'll pull the CSS from that Pen and include it. If it's using a matching preprocessor, use the appropriate URL Extension and we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
JavaScript preprocessors can help make authoring JavaScript easier and more convenient.
Babel includes JSX processing.
Any URL's added here will be added as <script>
s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
Search for and use JavaScript packages from npm here. By selecting a package, an import
statement will be added to the top of the JavaScript editor for this package.
Using packages here is powered by Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
usage.
All packages are different, so refer to their docs for how they work.
If you're using React / ReactDOM, make sure to turn on Babel for the JSX processing.
If active, Pens will autosave every 30 seconds after being saved once.
If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.
If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.
Visit your global Editor Settings.
<head style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<meta charset="utf-8" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<!-- utf-8 works for most cases -->
<meta name="viewport" content="width=device-width" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<!-- Forcing initial-scale shouldn't be necessary -->
<meta http-equiv="X-UA-Compatible" content="IE=edge" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<!-- Use the latest (edge) version of IE rendering engine -->
<title style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;"></title>
<!-- The title tag shows in email notifications, like Android 4.4. -->
<!-- Web Font / @font-face : BEGIN -->
<!-- NOTE: If web fonts are not required, lines 9 - 26 can be safely removed. -->
<!-- Desktop Outlook chokes on web font references and defaults to Times New Roman, so we force a safe fallback font. -->
<!--[if mso]>
<style>
* {
font-family: sans-serif !important;
}
</style>
<![endif]-->
<!-- All other clients get the webfont reference; some will render the font and others will silently fail to the fallbacks. More on that here: http://stylecampaign.com/blog/2015/02/webfont-support-in-email/ -->
<!--[if !mso]><!-->
<link href="https://t11media.s3.amazonaws.com/email/transactional/fonts/fonts.css" rel="stylesheet" type="text/css" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<!--<![endif]-->
<!-- Web Font / @font-face : END -->
<!-- CSS Reset -->
<style type="text/css" style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
/* What it does: Remove spaces around the email design added by some email clients. */
/* Beware: It can remove the padding / margin and add a background color to the compose a reply window. */
html,
body {
Margin: 0 !important;
padding: 0 !important;
height: 100% !important;
width: 100% !important;
}
/* What it does: Stops email clients resizing small text. */
* {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
/* What it does: Centers email on Android 4.4 */
div[style*="margin: 16px 0"] {
margin: 0 !important;
}
/* What it does: Stops Outlook from adding extra spacing to tables. */
table,
td {
mso-table-lspace: 0pt !important;
mso-table-rspace: 0pt !important;
}
/* What it does: Fixes webkit padding issue. Fix for Yahoo mail table alignment bug. Applies table-layout to the first 2 tables then removes for anything nested deeper. */
table {
border-spacing: 0 !important;
border-collapse: collapse !important;
table-layout: fixed !important;
Margin: 0 auto !important;
}
table table table {
table-layout: auto;
}
/* What it does: Uses a better rendering method when resizing images in IE. */
img {
-ms-interpolation-mode: bicubic;
}
/* What it does: Overrides styles added when Yahoo's auto-senses a link. */
.yshortcuts a {
border-bottom: none !important;
}
/* What it does: A work-around for iOS meddling in triggered links. */
.mobile-link--footer a,
a[x-apple-data-detectors] {
color: inherit !important;
text-decoration: underline !important;
}
</style>
<!-- Progressive Enhancements -->
<style style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
/* What it does: Hover styles for buttons */
.button-td,
.button-a {
transition: all 100ms ease-in;
}
.button-td:hover,
.button-a:hover {
background: #000000 !important;
border-color: #000000 !important;
}
/* Media Queries */
@media screen and (max-width: 480px) {
/* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */
.fluid,
.fluid-centered {
width: 100% !important;
max-width: 100% !important;
height: auto !important;
Margin-left: auto !important;
Margin-right: auto !important;
}
/* And center justify these ones. */
.fluid-centered {
Margin-left: auto !important;
Margin-right: auto !important;
}
/* What it does: Forces table cells into full-width rows. */
.stack-column,
.stack-column-center {
display: block !important;
width: 100% !important;
max-width: 100% !important;
direction: ltr !important;
}
/* And center justify these ones. */
.stack-column-center {
text-align: center !important;
}
/* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */
.center-on-narrow {
text-align: center !important;
display: block !important;
Margin-left: auto !important;
Margin-right: auto !important;
float: none !important;
}
table.center-on-narrow {
display: inline-block !important;
}
.heading-text {
font-size: 36px!important;
line-height: 36px!important;
}
}
</style>
</head>
<body width="100%" bgcolor="#131416" style="margin: 0 !important;background-color: #131416;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;padding: 0 !important;height: 100% !important;width: 100% !important;">
<div style="background: #131416;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%" bgcolor="#131416" style="border-collapse: collapse!important;border-spacing: 0!important;margin: 0 auto;table-layout: fixed!important;background: url('https://cdn.shopify.com/s/files/1/0013/7332/files/trans_email_footer.jpg?317488461733349908') no-repeat bottom center/100% auto;max-width: 1000px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td valign="top" style="background: url('https://cdn.shopify.com/s/files/1/0013/7332/files/trans_email_header.jpg?317488461733349908') no-repeat top center/100% auto;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<center style="width: 100%;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<!-- Visually Hidden Preheader Text : BEGIN -->
<div style="display: none;font-size: 1px;line-height: 1px;max-height: 0px;max-width: 0px;opacity: 0;overflow: hidden;mso-hide: all;font-family: sans-serif;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
Click the link in this email to confirm your subscription to the theory11 newsletter
</div>
<!-- Visually Hidden Preheader Text : END -->
<!--
Set the email width. Defined in two places:
1. max-width for all clients set with Outlook, allowing the email to squish on narrow but never go wider than 600px.
2. MSO tags for Desktop Windows Outlook enforce a 600px width.
-->
<div style="max-width: 680px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<!--[if (gte mso 9)|(IE)]>
<table cellspacing="0" cellpadding="0" border="0" width="680" align="center">
<tr>
<td>
<![endif]-->
<!-- Email Letterhead : BEGIN -->
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;border-spacing: 0 !important;border-collapse: collapse !important;table-layout: fixed !important;margin: 0 auto !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td style="padding: 20px;text-align: center;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<a style="border: none;display: block;padding: 0;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" href="https://www.theory11.com" target="_blank">
<img src="https://t11media.s3.amazonaws.com/email/transactional/logo_top.png" width="100%" style="width: 100%;height: auto;border: none;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;-ms-interpolation-mode: bicubic;" border="0" alt="theory11">
</a>
</td>
</tr>
</tbody>
</table>
<!-- Email Letterhead : END -->
<!-- Email Header : BEGIN -->
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;border-spacing: 0 !important;border-collapse: collapse !important;table-layout: fixed !important;margin: 0 auto !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td id="heading" class="heading-text" style="padding: 25px 20px 8px 20px;text-align: center;color: #b78846;font-family: 'minion-pro', 'Minion Pro', Georgia, serif;text-transform: uppercase;font-weight: 500;font-size: 42px;line-height: 46px;letter-spacing: 4px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
Newsletter
</td>
</tr>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td id="subheading" style="padding: 0 20px 10px 20px;text-align: center;color: #FFFFFF;text-transform: uppercase;font-family: 'brandon-grotesque', 'Brandon Grotesque', helvetica, arial, sans-serif;font-size: 18px;font-weight: 700;line-height: 24px;letter-spacing: 4px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
Please Confirm Subscription
</td>
</tr>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td style="padding: 0 0 10px 0;text-align: center;color: #b78846;text-transform: uppercase;font-family: arial, helvetica, sans-serif;font-size: 12px;font-weight: 700;line-height: 12px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
♦ ♦ ♦
</td>
</tr>
</tbody>
</table>
<!-- Email Header : END -->
<!-- Email Body : BEGIN -->
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;border-spacing: 0 !important;border-collapse: collapse !important;table-layout: fixed !important;margin: 0 auto !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td style="font-family: 'brandon-grotesque', 'Brandon Grotesque', helvetica, arial, sans-serif;color: #FFFFFF;font-size: 18px;line-height: 22px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<!-- Button : Begin -->
<table cellspacing="0" cellpadding="0" border="0" align="center" style="padding-top: 30px;margin: auto;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;table-layout: fixed !important;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;border-spacing: 0 !important;border-collapse: collapse !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td style="background: #b78846;text-align: center;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;transition: all 100ms ease-in;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;" class="button-td">
<a href="https://www.theory11.com/" style="background: #b78846;border: 15px solid #b78846;padding: 0 10px;color: #ffffff;font-family: 'brandon-grotesque', 'Brandon Grotesque', helvetica, arial, sans-serif;text-transform: uppercase;letter-spacing: 2px;font-size: 16px;line-height: 1.1;text-align: center;text-decoration: none;display: block;font-weight: bold;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;transition: all 100ms ease-in;"
class="button-a" target="_blank">
<!--[if mso]> <![endif]-->Yes, sign me up!
<!--[if mso]> <![endif]-->
</a>
</td>
</tr>
</tbody>
</table>
<!-- Button : END -->
<table border="0" cellpadding="0" cellspacing="0" align="center" width="100%" style="max-width: 660px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;table-layout: fixed !important;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;border-spacing: 0 !important;border-collapse: collapse !important;margin: 0 auto !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td align="center" valign="top" style="font-size: 0;padding: 10px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<p style="font-family: 'brandon-grotesque', 'Brandon Grotesque', helvetica, arial, sans-serif;color: #FFFFFF;font-size: 20px;line-height: 32px;margin: 10px 0;display: block;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">Click the confirmation link above to subscribe and <strong style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">learn a free trick immediately!</strong> Instructions on how to watch your first free video will
be sent as soon as you hit the button.</p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<!-- Email Body : END -->
<!-- Email Footer : BEGIN -->
<table cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="max-width: 680px;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;border-spacing: 0 !important;border-collapse: collapse !important;table-layout: fixed !important;margin: 0 auto !important;">
<tbody>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<a style="border: none;display: block;padding: 0;width: 112px;margin: 50px auto 0px auto;text-align: center;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" href="https://www.theory11.com" target="_blank">
<img src="https://t11media.s3.amazonaws.com/email/transactional/logo_txi.png" width="80" style="width: 80px;height: auto;border: none;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;-ms-interpolation-mode: bicubic;" border="0" alt="theory11">
</a>
</td>
</tr>
<tr style="-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
<td style="padding: 20px 20px 40px 20px;width: 100%;font-size: 16px;font-family: 'brandon-grotesque', 'Brandon Grotesque', helvetica, arial, sans-serif;mso-height-rule: exactly;line-height: 20px;text-align: center;color: #FFFFFF;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;mso-table-lspace: 0pt !important;mso-table-rspace: 0pt !important;">
<div style="max-width: 320px;margin: 0 auto;text-align: center;display: inline-block;position: relative;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;">
If you have any questions about this email, contact <a href="https://www.theory11.com/support" style="margin: 0;padding: 0;color: #b78846;text-decoration: none;-ms-text-size-adjust: 100%;-webkit-text-size-adjust: 100%;" target="_blank">theory11 support</a> or reply to this message.
</div>
</td>
</tr>
</tbody>
</table>
<!-- Email Footer : END -->
<!--[if (gte mso 9)|(IE)]>
</td>
</tr>
</table>
<![endif]-->
</div>
</center>
</td>
</tr>
</tbody>
</table>
</div>
</body>
Also see: Tab Triggers