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.
<div></div>
div {
margin-top: 50px;
margin-left: 50px;
height: 90px;
width: 800px;
box-shadow: 4px 8px 0 14px #94A1B2, 4px 22px 0 14px #3F4A4E, 22px -13px 0 -4px #3F4A4E;
background: #476EB1;
border-top-left-radius: 9% 100%;
background-image: linear-gradient(90deg, #94A1B2 55px, transparent 55px, transparent 80px, #476EB1 80px, #476EB1 95px, transparent 95px, transparent 145px, #476EB1 145px, #476EB1 160px, transparent 160px, transparent 175px, #476EB1 175px, #476EB1 182px, transparent 182px, transparent 197px, #476EB1 197px, #476EB1 212px, transparent 212px, transparent 297px, #476EB1 297px, #476EB1 304px, transparent 304px, transparent 389px, #476EB1 389px, #476EB1 404px, transparent 404px, transparent 419px, #476EB1 419px, #476EB1 426px, transparent 426px, transparent 441px, #476EB1 441px, #476EB1 456px, transparent 456px, transparent 541px, #476EB1 541px, #476EB1 548px, transparent 548px, transparent 633px, #476EB1 633px, #476EB1 648px, transparent 648px, transparent 663px, #476EB1 663px, #476EB1 670px, transparent 670px, transparent 685px, #476EB1 685px, #476EB1 700px, transparent 700px, transparent 785px, #476EB1 785px), linear-gradient(to bottom, transparent 4.95px, rgba(177, 113, 71, .4) 6.3px, #C6CBCE 13.5%, rgba(177, 113, 71, .4) 27px, rgba(177, 113, 71, .4) 76.5px, rgba(177, 113, 71, .4) 84.6px, transparent 84.6px), radial-gradient(circle at 173px 55px, red 1px, transparent 3px), radial-gradient(circle at 173px 55px, #2f66ff 5px, transparent 6px), radial-gradient(circle at 173px 79px, red 1px, transparent 3px), radial-gradient(circle at 173px 79px, #2f66ff 5px, transparent 6px), radial-gradient(circle at 416px 55px, red 1px, transparent 3px), radial-gradient(circle at 416px 55px, #2f66ff 5px, transparent 6px), radial-gradient(circle at 660px 55px, red 1px, transparent 3px), radial-gradient(circle at 660px 55px, #2f66ff 5px, transparent 6px);
}
div:before {
content: "\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a\a MVG";
white-space: pre;
color: blue;
font-size: 6px;
position: absolute;
top: 55px;
left: 65px;
height: 92px;
width: 60px;
background: #476EB1;
box-shadow: -2px -2px 0 2px #476EB1;
border-top-left-radius: 100% 100%;
background-image: linear-gradient(340deg, #94A1B2 6%, transparent 6%), linear-gradient(340deg, #476EB1 11%, transparent 11%), linear-gradient(to top, #476EB1 4%, transparent 4%), linear-gradient(to right, transparent 20px, #476EB1 20px, #476EB1 35px, transparent 35px), radial-gradient(circle at 3px 89px, #000 9px, transparent 10px), radial-gradient(circle at 9px 72px, #000 3px, transparent 4px), linear-gradient(to bottom, transparent 0px, rgba(177, 113, 71, .4) 2px, #C6CBCE 7px, rgba(177, 113, 71, .4) 22px, rgba(177, 113, 71, .4) 71.5px, rgba(177, 113, 71, .4) 84.6px);
}
div:after {
content: "\a\a\a\a\a\a\a\a\a\a\a \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 \00a0 MVG";
white-space: pre-wrap;
height: 7px;
width: 1px;
color: blue;
font-size: 8px;
background: #000;
position: absolute;
top: 50px;
left: 263px;
box-shadow: -190px 81px 0 0px #fff, -191px 80px 0 1px #94A1B2, -150px -10px 0 0px #94A1B2, -150px -17px 0 0px #94A1B2, -150px -21px 0 0px #94A1B2, -160px 100px 0 0.5px #000, -179px 100px 0 1.5px #000, -170px 14px 0 .5px #000, -170px 21px 0 .5px #000, -170px 28px 0 .5px #000, -170px 35px 0 .5px #000, -170px 42px 0 .5px #000, -170px 49px 0 .5px #000, -170px 56px 0 .5px #000, -170px 63px 0 .5px #000, -170px 70px 0 .5px #000, -170px 77px 0 .5px #000, -170px 84px 0 .5px #000, -170px 91px 0 .5px #000, -170px 98px 0 .5px #000, -170px 105px 0 .5px #000, -170px 112px 0 .5px #000, -170px 118px 0 .5px #000, -117px 0px 0 0px #000, -117px 7px 0 0px #000, -117px 14px 0 0px #000, -117px 21px 0 0px #000, -117px 28px 0 0px #000, -117px 35px 0 0px #000, -117px 42px 0 0px #000, -117px 49px 0 0px #000, -117px 56px 0 0px #000, -117px 63px 0 0px #000, -117px 70px 0 0px #000, -117px 77px 0 0px #000, -117px 84px 0 0px #000, -117px 91px 0 0px #000, -117px 98px 0 0px #000, -117px 105px 0 0px #000, -117px 112px 0 0px #000, -117px 118px 0 0px #000, -52px 0px 0 0px #000, -52px 7px 0 0px #000, -52px 14px 0 0px #000, -52px 21px 0 0px #000, -52px 28px 0 0px #000, -52px 35px 0 0px #000, -52px 42px 0 0px #000, -52px 49px 0 0px #000, -52px 56px 0 0px #000, -52px 63px 0 0px #000, -52px 70px 0 0px #000, -52px 77px 0 0px #000, -52px 84px 0 0px #000, -52px 91px 0 0px #000, -52px 98px 0 0px #000, -52px 105px 0 0px #000, -52px 112px 0 0px #000, -52px 118px 0 0px #000, -26px 0px 0 0px #000, -26px 7px 0 0px #000, -26px 14px 0 0px #000, -26px 21px 0 0px #000, -26px 28px 0 0px #000, -26px 35px 0 0px #000, -26px 42px 0 0px #000, -26px 49px 0 0px #000, -26px 56px 0 0px #000, -26px 63px 0 0px #000, -26px 70px 0 0px #000, -26px 77px 0 0px #000, -26px 84px 0 0px #000, -26px 91px 0 0px #000, -26px 98px 0 0px #000, -26px 105px 0 0px #000, -26px 112px 0 0px #000, -26px 118px 0 0px #000, 0 7px 0 0px #000, 0 14px 0 0px #000, 0 21px 0 0px #000, 0 28px 0 0px #000, 0 35px 0 0px #000, 0 42px 0 0px #000, 0 49px 0 0px #000, 0 56px 0 0px #000, 0 63px 0 0px #000, 0 70px 0 0px #000, 0 77px 0 0px #000, 0 84px 0 0px #000, 0 91px 0 0px #000, 0 98px 0 0px #000, 0 105px 0 0px #000, 0 112px 0 0px #000, 0 118px 0 0px #000, 38px -6px 0 0.5px #C6CBCE, 40px -6px 0 0px #000, 42px -6px 0 0px #000, 44px -6px 0 0px #000, 46px -6px 0 0px #000, 48px -6px 0 0px #000, 50px -6px 0 0px #000, 52px -6px 0 0px #000, 54px -6px 0 0.5px #C6CBCE, 192px 0px 0 0px #000, 192px 7px 0 0px #000, 192px 14px 0 0px #000, 192px 21px 0 0px #000, 192px 28px 0 0px #000, 192px 35px 0 0px #000, 192px 42px 0 0px #000, 192px 49px 0 0px #000, 192px 56px 0 0px #000, 192px 63px 0 0px #000, 192px 70px 0 0px #000, 192px 77px 0 0px #000, 192px 84px 0 0px #000, 192px 91px 0 0px #000, 192px 98px 0 0px #000, 192px 105px 0 0px #000, 192px 112px 0 0px #000, 192px 118px 0 0px #000, 217px 0px 0 0px #000, 217px 7px 0 0px #000, 217px 14px 0 0px #000, 217px 21px 0 0px #000, 217px 28px 0 0px #000, 217px 35px 0 0px #000, 217px 42px 0 0px #000, 217px 49px 0 0px #000, 217px 56px 0 0px #000, 217px 63px 0 0px #000, 217px 70px 0 0px #000, 217px 77px 0 0px #000, 217px 84px 0 0px #000, 217px 91px 0 0px #000, 217px 98px 0 0px #000, 217px 105px 0 0px #000, 217px 112px 0 0px #000, 217px 118px 0 0px #000, 243px 0px 0 0px #000, 243px 7px 0 0px #000, 243px 14px 0 0px #000, 243px 21px 0 0px #000, 243px 28px 0 0px #000, 243px 35px 0 0px #000, 243px 42px 0 0px #000, 243px 49px 0 0px #000, 243px 56px 0 0px #000, 243px 63px 0 0px #000, 243px 70px 0 0px #000, 243px 77px 0 0px #000, 243px 84px 0 0px #000, 243px 91px 0 0px #000, 243px 98px 0 0px #000, 243px 105px 0 0px #000, 243px 112px 0 0px #000, 243px 118px 0 0px #000, 280px -6px 0 0.5px #C6CBCE, 282px -6px 0 0px #000, 284px -6px 0 0px #000, 286px -6px 0 0px #000, 288px -6px 0 0px #000, 290px -6px 0 0px #000, 292px -6px 0 0px #000, 294px -6px 0 0px #000, 296px -6px 0 0.5px #C6CBCE, 436px 0px 0 0px #000, 436px 7px 0 0px #000, 436px 14px 0 0px #000, 436px 21px 0 0px #000, 436px 28px 0 0px #000, 436px 35px 0 0px #000, 436px 42px 0 0px #000, 436px 49px 0 0px #000, 436px 56px 0 0px #000, 436px 63px 0 0px #000, 436px 70px 0 0px #000, 436px 77px 0 0px #000, 436px 84px 0 0px #000, 436px 91px 0 0px #000, 436px 98px 0 0px #000, 436px 105px 0 0px #000, 436px 112px 0 0px #000, 436px 118px 0 0px #000, 461px 0px 0 0px #000, 461px 7px 0 0px #000, 461px 14px 0 0px #000, 461px 21px 0 0px #000, 461px 28px 0 0px #000, 461px 35px 0 0px #000, 461px 42px 0 0px #000, 461px 49px 0 0px #000, 461px 56px 0 0px #000, 461px 63px 0 0px #000, 461px 70px 0 0px #000, 461px 77px 0 0px #000, 461px 84px 0 0px #000, 461px 91px 0 0px #000, 461px 98px 0 0px #000, 461px 105px 0 0px #000, 461px 112px 0 0px #000, 461px 118px 0 0px #000, 487px 0px 0 0px #000, 487px 7px 0 0px #000, 487px 14px 0 0px #000, 487px 21px 0 0px #000, 487px 28px 0 0px #000, 487px 35px 0 0px #000, 487px 42px 0 0px #000, 487px 49px 0 0px #000, 487px 56px 0 0px #000, 487px 63px 0 0px #000, 487px 70px 0 0px #000, 487px 77px 0 0px #000, 487px 84px 0 0px #000, 487px 91px 0 0px #000, 487px 98px 0 0px #000, 487px 105px 0 0px #000, 487px 112px 0 0px #000, 487px 118px 0 0px #000, 610px -8px 1px 1px #000, 610px -5px 1px 1px #000, 610px 2px 1px 1px #000, 610px 9px 1px 1px #000, 610px 16px 1px 1px #000, 610px 23px 1px 1px #000, 610px 30px 1px 1px #000, 610px 37px 1px 1px #000, 610px 44px 1px 1px #000, 610px 51px 1px 1px #000, 610px 58px 1px 1px #000, 610px 65px 1px 1px #000, 610px 72px 1px 1px #000, 610px 79px 1px 1px #000, 610px 86px 1px 1px #000, 610px 93px 1px 1px #000, 610px 100px 1px 1px #000, 610px 107px 1px 1px #000, 610px 114px 1px 1px #000, 610px 118px 1px 1px #000, 614px -3px 1px 1px grey, 614px 2px 1px 1px grey, 614px 9px 1px 1px grey, 614px 16px 1px 1px grey, 614px 23px 1px 1px grey, 614px 30px 1px 1px grey, 614px 37px 1px 1px grey, 614px 44px 1px 1px grey, 614px 51px 1px 1px grey, 614px 58px 1px 1px grey, 614px 65px 1px 1px grey, 614px 72px 1px 1px grey, 614px 79px 1px 1px grey, 614px 86px 1px 1px grey, 614px 93px 1px 1px grey, 614px 100px 1px 1px grey, 614px 107px 1px 1px grey, 614px 114px 1px 1px grey, 617px -8px 1px 1px #000, 617px -5px 1px 1px #000, 617px 2px 1px 1px #000, 617px 9px 1px 1px #000, 617px 16px 1px 1px #000, 617px 23px 1px 1px #000, 617px 30px 1px 1px #000, 617px 37px 1px 1px #000, 617px 44px 1px 1px #000, 617px 51px 1px 1px #000, 617px 58px 1px 1px #000, 617px 65px 1px 1px #000, 617px 72px 1px 1px #000, 617px 79px 1px 1px #000, 617px 86px 1px 1px #000, 617px 93px 1px 1px #000, 617px 100px 1px 1px #000, 617px 107px 1px 1px #000, 617px 114px 1px 1px #000, 617px 118px 1px 1px #000, 620px -3px 1px 1px grey, 620px 2px 1px 1px grey, 620px 9px 1px 1px grey, 620px 16px 1px 1px grey, 620px 23px 1px 1px grey, 620px 30px 1px 1px grey, 620px 37px 1px 1px grey, 620px 44px 1px 1px grey, 620px 51px 1px 1px grey, 620px 58px 1px 1px grey, 620px 65px 1px 1px grey, 620px 72px 1px 1px grey, 620px 79px 1px 1px grey, 620px 86px 1px 1px grey, 620px 93px 1px 1px grey, 620px 100px 1px 1px grey, 620px 107px 1px 1px grey, 620px 114px 1px 1px grey, 623px -8px 1px 1px #000, 623px -5px 1px 1px #000, 623px 2px 1px 1px #000, 623px 9px 1px 1px #000, 623px 16px 1px 1px #000, 623px 23px 1px 1px #000, 623px 30px 1px 1px #000, 623px 37px 1px 1px #000, 623px 44px 1px 1px #000, 623px 51px 1px 1px #000, 623px 58px 1px 1px #000, 623px 65px 1px 1px #000, 623px 72px 1px 1px #000, 623px 79px 1px 1px #000, 623px 86px 1px 1px #000, 623px 93px 1px 1px #000, 623px 100px 1px 1px #000, 623px 107px 1px 1px #000, 623px 114px 1px 1px #000, 623px 118px 1px 1px #000, 626px -3px 1px 1px grey, 626px 2px 1px 1px grey, 626px 9px 1px 1px grey, 626px 16px 1px 1px grey, 626px 23px 1px 1px grey, 626px 30px 1px 1px grey, 626px 37px 1px 1px grey, 626px 44px 1px 1px grey, 626px 51px 1px 1px grey, 626px 58px 1px 1px grey, 626px 65px 1px 1px grey, 626px 72px 1px 1px grey, 626px 79px 1px 1px grey, 626px 86px 1px 1px grey, 626px 93px 1px 1px grey, 626px 100px 1px 1px grey, 626px 107px 1px 1px grey, 626px 114px 1px 1px grey, 629px -8px 1px 1px #000, 629px -5px 1px 1px #000, 629px 2px 1px 1px #000, 629px 9px 1px 1px #000, 629px 16px 1px 1px #000, 629px 23px 1px 1px #000, 629px 30px 1px 1px #000, 629px 37px 1px 1px #000, 629px 44px 1px 1px #000, 629px 51px 1px 1px #000, 629px 58px 1px 1px #000, 629px 65px 1px 1px #000, 629px 72px 1px 1px #000, 629px 79px 1px 1px #000, 629px 86px 1px 1px #000, 629px 93px 1px 1px #000, 629px 100px 1px 1px #000, 629px 107px 1px 1px #000, 629px 114px 1px 1px #000, 629px 118px 1px 1px #000
}
Also see: Tab Triggers