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 {
background: radial-gradient(circle, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-50px 35px, radial-gradient(circle, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-30px 35px, linear-gradient(-135deg, #000 12px, transparent 12px)-140px 44px, linear-gradient(-225deg, #000 12px, transparent 12px) 60px 44px, linear-gradient(-115deg, #AE8160 7px, transparent 7px)-60px 110px, linear-gradient(-245deg, #AE8160 7px, transparent 7px) 141px 110px, linear-gradient(180deg, #fff 20px, transparent 20px) 0px 0, linear-gradient(180deg, #fff 20px, transparent 20px) 0px 140px, linear-gradient(180deg, #fff 20px, transparent 20px) 0px 60px, linear-gradient(180deg, #fff 20px, transparent 20px) 0px 79px, linear-gradient(90deg, #000 1px, transparent 1px) 20px 0, linear-gradient(90deg, #fff 20px, transparent 20px) 0px 0, linear-gradient(-155deg, #000 15px, transparent 15px)-120px 12px, linear-gradient(-205deg, #000 15px, transparent 15px) 40px 12px, linear-gradient(90deg, #000 1px, transparent 1px) 60px 0, linear-gradient(90deg, #000 1px, transparent 1px) 100px 0, linear-gradient(90deg, #000 1px, transparent 1px) 140px 0, linear-gradient(90deg, #fff 20px, transparent 20px) 60px 0, linear-gradient(90deg, #fff 20px, transparent 20px) 80px 0, linear-gradient(90deg, #fff 20px, transparent 20px) 140px 0, linear-gradient(-20deg, transparent 197px, #000 197px) 109px 47px, linear-gradient(-20deg, #000 8px, transparent 1px)-29px -104px, linear-gradient(0deg, #000 1px, transparent 1px) 0px -100px, linear-gradient(0deg, #000 1px, transparent 1px) 0px -20px, linear-gradient(0deg, #000 1px, transparent 1px) 0px -60px, linear-gradient(180deg, #000 1px, transparent 1px) 0px 20px, linear-gradient(-115deg, #fff 3px, transparent 3px)-110px 49px, linear-gradient(-250deg, #fff 3px, transparent 3px) 50px 49px, linear-gradient(-115deg, #fff 3px, transparent 3px)-130px 49px, linear-gradient(-250deg, #fff 3px, transparent 3px) 30px 49px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-50px -40px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-30px -40px, radial-gradient(circle, #ffffff 1px, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 30px -40px, radial-gradient(circle, #ffffff 1px, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 50px -40px, radial-gradient(circle, #000000 4px, #000000 5px, rgba(0, 0, 0, 0) 6px, rgba(0, 0, 0, 0)) 30px -40px, radial-gradient(circle, #000000 4px, #000000 5px, rgba(0, 0, 0, 0) 6px, rgba(0, 0, 0, 0)) 50px -40px, linear-gradient(45deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px) 109px -106px, linear-gradient(45deg, #A2BD77 30px, transparent 30px) 98px -101px, linear-gradient(225deg, #A2BD77 30px, transparent 30px)-20px 20px, linear-gradient(0deg, #000 1px, transparent 1px)-105px -111px, linear-gradient(45deg, #f8dbd0 30px, transparent 30px) 18px -101px, linear-gradient(225deg, #f8dbd0 30px, transparent 30px)-100px 20px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 30px 37px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 51px 37px, radial-gradient(circle, #62300d 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0)) 39px 41px, radial-gradient(circle, #62300d 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0)) 41px 41px, radial-gradient(circle, #62300d 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0)) 43px 41px, linear-gradient(160deg, #FAE2B4 11px, transparent 11px) 105px 111px, linear-gradient(-20deg, #FAE2B4 11px, transparent 11px)-24px -37px, radial-gradient(circle, rgba(0, 0, 0, 0) 3px, #62300d 3px, rgba(0, 0, 0, 0) 5px) 38px 43px, radial-gradient(circle, rgba(0, 0, 0, 0) 3px, #62300d 3px, rgba(0, 0, 0, 0) 5px) 44px 43px, radial-gradient(circle, #fae2b4 10px, rgba(0, 0, 0, 0) 11px, rgba(0, 0, 0, 0)) 41px 44px, linear-gradient(30deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px) 98px -26px, linear-gradient(-30deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px)-16px -26px, linear-gradient(60deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px) 103px -17px, linear-gradient(-60deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px)-22px -17px, linear-gradient(45deg, #AE8160 30px, transparent 30px) 98px -21px, linear-gradient(225deg, #AE8160 30px, transparent 30px)-20px 100px, radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0) 50px, #000000 50px, #000000 55px, rgba(0, 0, 0, 0) 55px, rgba(0, 0, 0, 0) 65px, #000000 65px, rgba(0, 0, 0, 0) 66px) -40px -13px, radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0) 50px, #000000 50px, #000000 55px, rgba(0, 0, 0, 0) 55px, rgba(0, 0, 0, 0) 61px, #000000 61px, rgba(0, 0, 0, 0) 62px) -40px 85px, linear-gradient(0deg, #000 5px, transparent 5px) 0px -42px, linear-gradient(45deg, #ccc 30px, transparent 30px) 18px -21px, linear-gradient(225deg, #ccc 30px, transparent 30px)-100px 100px;
background-color: #f8dbd0;
background-size: 160px 160px;
}
body {
height: 100vh;
overflow: hidden;
font-family: 'Bahiana', cursive;
font-size: 3vw;
text-align: left;
}
body::before {
content: '';
width: 50%;
height: 100vh;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto auto auto 0;
border-right: 2px solid #fff;
background: radial-gradient(circle, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-50px 35px, radial-gradient(circle, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-30px 35px, linear-gradient(-135deg, #000 12px, transparent 12px)-140px 44px, linear-gradient(-225deg, #000 12px, transparent 12px) 60px 44px, linear-gradient(-115deg, #aaa 7px, transparent 7px)-60px 110px, linear-gradient(-245deg, #aaa 7px, transparent 7px) 141px 110px, linear-gradient(180deg, #eee 20px, transparent 20px) 0 0, linear-gradient(180deg, #eee 20px, transparent 20px) 0 140px, linear-gradient(180deg, #eee 20px, transparent 20px) 0 60px, linear-gradient(180deg, #eee 20px, transparent 20px) 0 79px, linear-gradient(90deg, #000 1px, transparent 1px) 20px 0, linear-gradient(90deg, #eee 20px, transparent 20px) 0 0, linear-gradient(-155deg, #000 15px, transparent 15px)-120px 12px, linear-gradient(-205deg, #000 15px, transparent 15px) 40px 12px, linear-gradient(90deg, #000 1px, transparent 1px) 60px 0, linear-gradient(90deg, #000 1px, transparent 1px) 100px 0, linear-gradient(90deg, #000 1px, transparent 1px) 140px 0, linear-gradient(90deg, #eee 20px, transparent 20px) 60px 0, linear-gradient(90deg, #eee 20px, transparent 20px) 80px 0, linear-gradient(90deg, #eee 20px, transparent 20px) 140px 0, linear-gradient(-20deg, transparent 197px, #000 197px) 109px 47px, linear-gradient(-20deg, #000 8px, transparent 1px)-29px -104px, linear-gradient(0deg, #000 1px, transparent 1px) 0 -100px, linear-gradient(0deg, #000 1px, transparent 1px) 0 -20px, linear-gradient(0deg, #000 1px, transparent 1px) 0 -60px, linear-gradient(180deg, #000 1px, transparent 1px) 0 20px, linear-gradient(-115deg, #fff 3px, transparent 3px)-110px 49px, linear-gradient(-250deg, #fff 3px, transparent 3px) 50px 49px, linear-gradient(-115deg, #fff 3px, transparent 3px)-130px 49px, linear-gradient(-250deg, #fff 3px, transparent 3px) 30px 49px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-50px -40px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0))-30px -40px, radial-gradient(circle, #ffffff 1px, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 30px -40px, radial-gradient(circle, #ffffff 1px, #ffffff 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 50px -40px, radial-gradient(circle, #000000 4px, #000000 5px, rgba(0, 0, 0, 0) 6px, rgba(0, 0, 0, 0)) 30px -40px, radial-gradient(circle, #000000 4px, #000000 5px, rgba(0, 0, 0, 0) 6px, rgba(0, 0, 0, 0)) 50px -40px, linear-gradient(45deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px) 109px -106px, linear-gradient(45deg, #ccc 30px, transparent 30px) 98px -101px, linear-gradient(225deg, #ccc 30px, transparent 30px)-20px 20px, linear-gradient(0deg, #000 1px, transparent 1px)-105px -111px, linear-gradient(45deg, #dadada 30px, transparent 30px) 18px -101px, linear-gradient(225deg, #dadada 30px, transparent 30px)-100px 20px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 30px 37px, radial-gradient(circle, #000000 2px, rgba(0, 0, 0, 0) 3px, rgba(0, 0, 0, 0)) 51px 37px, radial-gradient(circle, #000000 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0)) 39px 41px, radial-gradient(circle, #000000 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0)) 41px 41px, radial-gradient(circle, #000000 1px, rgba(0, 0, 0, 0) 2px, rgba(0, 0, 0, 0)) 43px 41px, linear-gradient(160deg, #eee 11px, transparent 11px) 105px 111px, linear-gradient(-20deg, #eee 11px, transparent 11px)-24px -37px, radial-gradient(circle, rgba(0, 0, 0, 0) 3px, #62300d 3px, rgba(0, 0, 0, 0) 5px) 38px 43px, radial-gradient(circle, rgba(0, 0, 0, 0) 3px, #62300d 3px, rgba(0, 0, 0, 0) 5px) 44px 43px, radial-gradient(circle, #eeeeee 10px, rgba(0, 0, 0, 0) 11px, rgba(0, 0, 0, 0)) 41px 44px, linear-gradient(30deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px) 98px -26px, linear-gradient(-30deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px)-16px -26px, linear-gradient(60deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px) 103px -17px, linear-gradient(-60deg, transparent 0, transparent 30px, #000 31px, transparent 31.5px)-22px -17px, linear-gradient(45deg, #aaa 30px, transparent 30px) 98px -21px, linear-gradient(225deg, #aaa 30px, transparent 30px)-20px 100px, radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0) 50px, #000000 50px, #000000 55px, rgba(0, 0, 0, 0) 55px, rgba(0, 0, 0, 0) 65px, #000000 65px, rgba(0, 0, 0, 0) 66px) -40px -13px, radial-gradient(ellipse closest-side, rgba(0, 0, 0, 0) 50px, #000000 50px, #000000 55px, rgba(0, 0, 0, 0) 55px, rgba(0, 0, 0, 0) 61px, #000000 61px, rgba(0, 0, 0, 0) 62px) -40px 85px, linear-gradient(0deg, #000 5px, transparent 5px) 0 -42px, linear-gradient(45deg, #ccc 30px, transparent 30px) 18px -21px, linear-gradient(225deg, #ccc 30px, transparent 30px)-100px 100px;
background-color: #f8dbd0;
background-size: 160px 160px;
}
Also see: Tab Triggers