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.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=EDGE" />
<style>
body {
-webkit-font-smoothing: antialiased; -webkit-text-size-adjust: none; height: 100%;
padding:0;margin:0;
}
@media screen and (max-width:9999px){
.ehotspot img{
max-height:none!important;
}
.fallback{
display:none;
display:none!important;
max-height:0;
overflow:hidden;
}
.eblock{
display:block!important;
max-height:none!important;
position:relative;
overflow:hidden;
margin:0 auto;
font-size:0;
line-height:0;
}
.eblock1{
width:600px;height:481px;
}
.eblock2{
width:600px;height:577px;
}
.eblock3{
width:600px;height:540px;
}
}
.ehotspot span{
display:block;
padding:12px 18px;
border:2px solid #2e0f5f;
font-size:14px;line-height:normal;
font-family:Arial;
border-radius:5px;
background-color:#5d3f8f;
color:#ffffff;
}
.ehotspot:hover div{
max-height:none!important;
}
.hero a:link{
text-decoration:none;
font:15px Arial;
color:#555555;
}
@media screen and (max-device-width:1024px) {
.ehotspot:hover img{
visibility:hidden;
}
.ehotspot:hover + img{
max-height:none!important;
z-index:3;
transform:rotate(45deg);
}
.ehotspot img{
-webkit-animation: throb 0.8s infinite alternate;
}
@-webkit-keyframes throb {
0% { transform: scale(1); }
100% { transform: scale(0.9);}
}
}
@media screen and (max-device-width:480px) {
.ehotspot span{
font:17px Arial;
}
@-webkit-keyframes throb {
0% { transform: scale(1.1); }
100% { transform: scale(1);}
}
}
/* Defeat Samsung Email Client */
#MessageViewBody .ehotspot:hover img { visibility:visible!important; }
#MessageViewBody .ehotspot:hover + img { display:none!important; }
</style>
</head>
<body>
<center><BR>
<table width="600"><tr><td>
<div class="fallback" summary="fallback">
<img src="http://freshinbox.com/examples/hotspots/images/eoablock-top.png" width=600 style="display:block;">
<img src="http://freshinbox.com/examples/hotspots/images/eoablock-1.png" width=600 style="display:block;">
<img src="http://freshinbox.com/examples/hotspots/images/eoablock-2.png" width=600 style="display:block;">
<img src="http://freshinbox.com/examples/hotspots/images/eoablock-3.png" width=600 style="display:block;">
</div>
<!--[if !mso 9]><!-->
<div class="hint " style="mso-hide:all;display:none;max-height:0;overflow:hidden;text-align:center;">
<center>
<div style="font-size:26px;line-height:40px;">Tap
<img src="http://freshinbox.com/examples/hotspots/plus.png" width=25> below to view more information</div>
</center>
</div>
<!--<![endif]-->
<div class="eblock-top"><img src="http://freshinbox.com/examples/hotspots/images/eoablock-top.png" width=600 style=""></div>
<div class="eblock1 eblock" summary="eblock1" style="mso-hide:all;display:none;max-height:0;overflow:hidden;">
<div style="max-height:0;max-width:0;overflow:visible!important;">
<div style="width:600px;height:481px;display:inline-block;text-align:center;">
<a href="#eoa"><img src="http://freshinbox.com/examples/hotspots/images/eoablock-1.png" width=600 style=""></a>
</a>
</div>
</div>
<div class="x1" summary="x1" style="mso-hide:all;max-height:0;max-width:0;overflow:visible!important;">
<div style="position:relative;Margin-top:40px;Margin-left:20px;display:inline-block;">
<div class="ehotspot" summary="ehotspot" style="z-index:2;position:absolute;max-width:0px;overflow:visible!important;">
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="max-height:0;">
<div style="max-height:0px;overflow:hidden;width:250px;">
<span>Of those who responded to Email on Acid's survey, 32% were developers and 25% marketers.</span>
</div>
</div>
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="position:absolute;top:0px;max-height:0;">
</div>
</div>
<div class="x1" summary="x1" style="mso-hide:all;max-height:0;max-width:0;overflow:visible!important;">
<div style="position:relative;Margin-top:310px;Margin-left:160px;display:inline-block;">
<div class="ehotspot" summary="ehotspot" style="z-index:2;position:absolute;max-width:0px;overflow:visible!important;">
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="max-height:0;">
<div style="max-height:0px;overflow:hidden;width:290px;Margin-left:30px;">
<span>According to the 2015 National Client Email report, the largest group of marketers - 39% - mails 2-3 times a month.</span>
</div>
</div>
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="position:absolute;top:0px;max-height:0;">
</div>
</div>
</div>
<div class="eblock2 eblock" summary="eblock2" style="mso-hide:all;display:none;max-height:0;overflow:hidden;">
<div style="max-height:0;max-width:0;overflow:visible!important;">
<div style="width:600px;height:577px;display:inline-block;text-align:center;">
<a href="#eoa"><img src="http://freshinbox.com/examples/hotspots/images/eoablock-2.png" width=600 style=""></a>
</a>
</div>
</div>
<div class="x1" summary="x1" style="mso-hide:all;max-height:0;max-width:0;overflow:visible!important;">
<div style="position:relative;Margin-top:130px;Margin-left:305px;display:inline-block;">
<div class="ehotspot" summary="ehotspot" style="z-index:2;position:absolute;max-width:0px;overflow:visible!important;">
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="max-height:0;">
<div style="max-height:0px;overflow:hidden;width:280px;">
<span>AVARI reported that their customers are seeing an average lift in CTOR (click-to-open rate) of 7% for emails with predictively personalized content versus emails without it.</span>
</div>
</div>
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="position:absolute;top:0px;max-height:0;">
</div>
</div>
</div>
<div class="eblock3 eblock" summary="eblock3" style="mso-hide:all;display:none;max-height:0;overflow:hidden;">
<div style="max-height:0;max-width:0;overflow:visible!important;">
<div style="width:600px;height:540px;display:inline-block;text-align:center;">
<a href="#eoa"><img src="http://freshinbox.com/examples/hotspots/images/eoablock-3.png" width=600 style=""></a>
</a>
</div>
</div>
<div class="x1" summary="x1" style="mso-hide:all;max-height:0;max-width:0;overflow:visible!important;">
<div style="position:relative;Margin-top:45px;Margin-left:298px;display:inline-block;">
<div class="ehotspot" summary="ehotspot" style="z-index:2;position:absolute;max-width:0px;overflow:visible!important;">
<img src="http://freshinbox.com/examples/hotspots/plus.png" width=45 style="max-height:0;Margin-left:190px;">
<div style="max-height:0px;overflow:hidden;width:280px;">
<span>Lyris found that 39% of marketers who segmented their email lists to send more personalized email experienced higher open rates, 28% experienced lower unsubscribe rates, and 24% experienced better deliverability and greater revenue.</span>
</div>
</div>
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="position:absolute;top:0px;max-height:0;">
</div>
</div>
<div class="x1" summary="x1" style="mso-hide:all;max-height:0;max-width:0;overflow:visible!important;">
<div style="position:relative;Margin-top:250px;Margin-left:190px;display:inline-block;">
<div class="ehotspot" summary="ehotspot" style="z-index:2;position:absolute;max-width:0px;overflow:visible!important;">
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="max-height:0;">
<div style="max-height:0px;overflow:hidden;width:350px;">
<span>According to BlueHornet, 70% of consumers immediately delete emails that don't render well on a mobile device. With over 50% of email opens occuring on mobile devices, mobile-friendly templates are critical to your bottom line.</span>
</div>
</div>
<img src="https://gallery.mailchimp.com/19a47edc5e37777e5911b3c46/images/2bc897ed-231c-477d-a2fe-c96001d9a280.png" width=45 style="position:absolute;top:0px;max-height:0;">
</div>
</div>
</div>
</td></tr></table>
</center>
</body>
</html>
Also see: Tab Triggers