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.
<body>
<div class="wrapper">
<!-- PRICING-TABLE CONTAINER -->
<div class="pricing-table group">
<h1 class="heading">
Pricing overview
</h1>
<!-- PERSONAL -->
<div class="block personal fl">
<h2 class="title">personal</h2>
<!-- CONTENT -->
<div class="content">
<p class="price">
<sup>$</sup>
<span>29</span>
<sub>/mo.</sub>
</p>
<p class="hint">Perfect for freelancers</p>
</div>
<!-- /CONTENT -->
<!-- FEATURES -->
<ul class="features">
<li><span class="fontawesome-cog"></span>1 WordPress Install</li>
<li><span class="fontawesome-star"></span>25,000 visits/mo.</li>
<li><span class="fontawesome-dashboard"></span>Unlimited Data Transfer</li>
<li><span class="fontawesome-cloud"></span>10GB Local Storage</li>
</ul>
<!-- /FEATURES -->
<!-- PT-FOOTER -->
<div class="pt-footer">
<p>Host My Website</p>
</div>
<!-- /PT-FOOTER -->
</div>
<!-- /PERSONAL -->
<!-- PROFESSIONAL -->
<div class="block professional fl">
<h2 class="title">Professional</h2>
<!-- CONTENT -->
<div class="content">
<p class="price">
<sup>$</sup>
<span>99</span>
<sub>/mo.</sub>
</p>
<p class="hint">Suitable for startups</p>
</div>
<!-- /CONTENT -->
<!-- FEATURES -->
<ul class="features">
<li><span class="fontawesome-cog"></span>10 WordPress Install</li>
<li><span class="fontawesome-star"></span>100,000 visits/mo.</li>
<li><span class="fontawesome-dashboard"></span>Unlimited Data Transfer</li>
<li><span class="fontawesome-cloud"></span>20GB Local Storage</li>
</ul>
<!-- /FEATURES -->
<!-- PT-FOOTER -->
<div class="pt-footer">
<p>Host My Website</p>
</div>
<!-- /PT-FOOTER -->
</div>
<!-- /PROFESSIONAL -->
<!-- BUSINESS -->
<div class="block business fl">
<h2 class="title">Business</h2>
<!-- CONTENT -->
<div class="content">
<p class="price">
<sup>$</sup>
<span>249</span>
<sub>/mo.</sub>
</p>
<p class="hint">For established business</p>
</div>
<!-- /CONTENT -->
<!-- FEATURES -->
<ul class="features">
<li><span class="fontawesome-cog"></span>25 WordPress Install</li>
<li><span class="fontawesome-star"></span>400,000 visits/mo.</li>
<li><span class="fontawesome-dashboard"></span>Unlimited Data Transfer</li>
<li><span class="fontawesome-cloud"></span>30GB Local Storage</li>
</ul>
<!-- /FEATURES -->
<!-- PT-FOOTER -->
<div class="pt-footer">
<p>Host My Website</p>
</div>
<!-- /PT-FOOTER -->
</div>
<!-- /BUSINESS -->
</div>
<!-- /PRICING-TABLE -->
</div>
</body>
/*
Inspired by the dribble shot http://dribbble.com/shots/1285240-Freebie-Flat-Pricing-Table?list=tags&tag=pricing_table
*/
/*--------- Font ------------*/
@import url(https://fonts.googleapis.com/css?family=Droid+Sans);
@import url(http://weloveiconfonts.com/api/?family=fontawesome);
/* fontawesome */
[class*="fontawesome-"]:before {
font-family: 'FontAwesome', sans-serif;
}
* {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
/*------ utiltity classes -----*/
.fl{ float:left; }
.fr{ float: right; }
/*its also known as clearfix*/
.group:before,
.group:after {
content: "";
display: table;
}
.group:after {
clear: both;
}
.group {
zoom: 1; /*For IE 6/7 (trigger hasLayout) */
}
body {
background: #F2F2F2;
font-family: 'Droid Sans', sans-serif;
line-height: 1;
font-size: 16px;
}
.wrapper {
}
.pricing-table {
width: 80%;
margin: 50px auto;
text-align: center;
padding: 10px;
padding-right: 0;
}
.pricing-table .heading{
color: #9C9E9F;
text-transform: uppercase;
font-size: 1.3rem;
margin-bottom: 4rem;
}
.block{
width: 30%;
margin: 0 15px;
overflow: hidden;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
/* border: 1px solid red;*/
}
/*Shared properties*/
.title,.pt-footer{
color: #FEFEFE;
text-transform: capitalize;
line-height: 2.5;
position: relative;
}
.content{
position: relative;
color: #FEFEFE;
padding: 20px 0 10px 0;
}
/*arrow creation*/
.content:after, .content:before,.pt-footer:before,.pt-footer:after {
top: 100%;
left: 50%;
border: solid transparent;
content: " ";
height: 0;
width: 0;
position: absolute;
pointer-events: none;
}
.pt-footer:after,.pt-footer:before{
top:0;
}
.content:after,.pt-footer:after {
border-color: rgba(136, 183, 213, 0);
border-width: 5px;
margin-left: -5px;
}
/*/arrow creation*/
.price{
position: relative;
display: inline-block;
margin-bottom: 0.625rem;
}
.price span{
font-size: 6rem;
letter-spacing: 8px;
font-weight: bold;
}
.price sup{
font-size: 1.5rem;
position: absolute;
top: 12px;
left: -12px;
}
.hint{
font-style: italic;
font-size: 0.9rem;
}
.features{
list-style-type: none;
background: #FFFFFF;
text-align: left;
color: #9C9C9C;
padding:30px 22%;
font-size: 0.9rem;
}
.features li{
padding:15px 0;
width: 100%;
}
.features li span{
padding-right: 0.4rem;
}
.pt-footer{
font-size: 0.95rem;
text-transform: capitalize;
}
/*PERSONAL*/
.personal .title{
background: #78CFBF;
}
.personal .content,.personal .pt-footer{
background: #82DACA;
}
.personal .content:after{
border-top-color: #82DACA;
}
.personal .pt-footer:after{
border-top-color: #FFFFFF;
}
/*PROFESSIONAL*/
.professional .title{
background: #3EC6E0;
}
.professional .content,.professional .pt-footer{
background: #53CFE9;
}
.professional .content:after{
border-top-color: #53CFE9;
}
.professional .pt-footer:after{
border-top-color: #FFFFFF;
}
/*BUSINESS*/
.business .title{
background: #E3536C;
}
.business .content,.business .pt-footer{
background: #EB6379;
}
.business .content:after{
border-top-color: #EB6379;
}
.business .pt-footer:after {
border-top-color: #FFFFFF;
}
Also see: Tab Triggers