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 URLs 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 its URL and the proper URL extension.
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 esm.sh, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ESM 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.
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office" lang="en" xml:lang="en">
<head>
<title>Data Viz in Email: Area Chart</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<style type="text/css">
/* DEFAULT STYLES */
#outlook a {
padding: 0;
}
.ReadMsgBody {
width: 100%;
}
.ExternalClass {
width: 100%;
}
.ExternalClass,
.ExternalClass span,
.ExternalClass td,
.ExternalClass div {
line-height: 100%;
}
body,
table,
td,
a {
-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;
display: block;
height: auto;
border: 0;
line-height: 100%;
outline: none;
text-decoration: none;
}
body {
height: 100% !important;
margin: 0 !important;
padding: 0 !important;
width: 100% !important;
}
sup {
font-size: 50%;
line-height: 1;
vertical-align: top;
mso-text-raise: 30%;
}
@media only screen and (max-width: 320px) {
.chart-container {
width: 300px !important;
max-width: 300px
}
}
</style>
<style type="text/css">
@media (prefers-dark-interface) {
.body {
background-color: #2a2c35;
color: #FFFFFF;
}
}
</style>
<!--[if !mso]><!-->
<style type="text/css">
@media screen {
@font-face {
font-family: "Nunito Light";
font-style: normal;
font-weight: 300;
src: local("Nunito Light"), local("Nunito-Light"), url(https://fonts.gstatic.com/s/nunito/v11/XRXW3I6Li01BKofAnsSUYevIWzgPDA.woff2) format("woff2");
mso-font-alt: 'Arial';
}
@font-face {
font-family: "Nunito Regular";
font-style: normal;
font-weight: 400;
src: local("Nunito Regular"), local("Nunito-Regular"), url(https://fonts.gstatic.com/s/nunito/v11/XRXV3I6Li01BKofINeaBTMnFcQ.woff2) format("woff2");
mso-font-alt: 'Arial';
}
@font-face {
font-family: "Nunito SemiBold";
font-style: normal;
font-weight: 600;
src: local("Nunito SemiBold"), local("Nunito-SemiBold"), url(https://fonts.gstatic.com/s/nunito/v11/XRXW3I6Li01BKofA6sKUYevIWzgPDA.woff2) format("woff2");
mso-font-alt: 'Arial';
}
}
</style>
<!--<![endif]-->
<!--[if gte mso 9
]><xml>
<o:OfficeDocumentSettings>
<o:AllowPNG />
<o:PixelsPerInch>96</o:PixelsPerInch>
</o:OfficeDocumentSettings>
</xml><!
[endif]-->
<!--[if mso]>
<style type="text/css">
body, span, table, td, h1, h2, h3, p {font-family: Helvetica, Arial, sans-serif !important;}
}
</style>
<![endif]-->
<meta name="robots" content="noindex, nofollow" />
</head>
<body class="body" style="padding:0; margin:0; text-align:center; background-color: #2a2c35;">
<table aria-label="Area Chart in Email" lang="en"
style="width: 320px; max-width: 320px; table-layout: fixed; margin: 20px auto; border-collapse: collapse" class="chart-container">
<tbody>
<tr>
<td colspan="7" align="left" valign="middle">
<h1
style="font-family: 'Nunito Light', 'Nunito-Light', Arial, sans-serif !important; font-weight: 300; margin: 0; font-size: 24px; line-height: 28px; color: #ffffff; margin:0; padding:0;">
On <span style="color: #ba3e8f; font-weight: 600;">Wednesdays</span> we <br>(mostly) wear pink
</h1>
</td>
</tr>
<tr>
<td colspan="7" style="font-size: 1px; line-height: 25px;">
</td>
</tr>
<tr>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
S</th>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
M</th>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
T</th>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
W</th>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
T</th>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
F</th>
<th
style="font-family: 'Nunito SemiBold', 'Nunito-SemiBold', Arial, sans-serif !important; font-weight: 600; font-size: 12px; color: #FFFFFF; text-align: center; padding: 0 0 10px;">
S</th>
</tr>
<tr>
<td class="day"
width="40" style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
</td>
<td class="day"
width="40" style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
</td>
<td class="day" width="40" title="October 1st, 2019: 51"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #d384b7; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 2nd, 2019: 73"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #ba3e8f; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 3rd, 2019: 71"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#ba3e8f; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 4th, 2019: 46"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #d384b7; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 5th, 2019: 12"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #f6e7f1; height: 20px"> </span>
</td>
</tr>
<tr style="font-weight: 300">
<td class="day" width="40" title="October 6th, 2019: 24"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 7th, 2019: 27"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 8th, 2019: 43"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#bf609e; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 9th, 2019: 68"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #ba3e8f; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 10th, 2019: 23"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 11th, 2019: 15"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #f6e7f1; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 12th, 2019: 10"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #f6e7f1; height: 20px"> </span>
</td>
</tr>
<tr style="font-weight: 300">
<td class="day" width="40" title="October 13th, 2019: 19"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 14th, 2019: 32"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #bf609e; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 15th, 2019: 23"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 16th, 2019: 62"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #ba3e8f; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 17th, 2019: 34"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#bf609e; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 18th, 2019: 12"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #f6e7f1; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 19th, 2019: 49"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #bf609e; height: 20px"> </span>
</td>
</tr>
<tr style="font-weight: 300">
<td class="day" width="40" title="October 20th, 2019: 24"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #d384b7; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 21st, 2019: 21"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #bf609e; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 22nd, 2019: 12"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 23rd, 2019: 17"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #d384b7; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 24th, 2019: 10"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 25th, 2019: 58"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #bf609e; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 26th, 2019: 28"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #d384b7; height: 20px"> </span>
</td>
</tr>
<tr style="font-weight: 300">
<td class="day" width="40" title="October 27th, 2019: 18"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 28th, 2019: 35"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #bf609e; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 29th, 2019: 10"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#e9c0da; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 30th, 2019: 62"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color: #ba3e8f; height: 20px"> </span>
</td>
<td class="day" width="40" title="October 31st, 2019: 27"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
<span
style="width: 100%; font-weight: 300; display: inline-block; background-color:#d384b7; height: 20px"> </span>
</td>
<td class="day" width="40"
style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
</td>
<td class="day"
width="40" style="padding: 0 5px 5px 0; width: 40px; font-weight: 300; margin: 0; text-align: left">
</td>
</tr>
</tbody>
</table>
</body>
</html>
Also see: Tab Triggers