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 class="dot"></div>
.dot{
position:relative;
width: 289px;
height: 289px;
margin:0 auto;
}
.dot::before {
content: "";
position:absolute;
top: -17px;
left: -17px;
width: 17px;
height: 17px;
background: transparent;
box-shadow:
17px 17px 0 rgb(255, 128, 128),
34px 17px 0 rgb(255, 128, 128),
51px 17px 0 rgb(255, 128, 128),
68px 17px 0 rgb(255, 128, 128),
85px 17px 0 rgb(255, 128, 128),
102px 17px 0 rgb(255, 128, 128),
119px 17px 0 rgb(255, 128, 128),
136px 17px 0 rgb(255, 128, 128),
153px 17px 0 rgb(255, 128, 128),
170px 17px 0 rgb(255, 128, 128),
187px 17px 0 rgb(255, 128, 128),
204px 17px 0 rgb(255, 128, 128),
221px 17px 0 rgb(255, 128, 128),
238px 17px 0 rgb(255, 128, 128),
255px 17px 0 rgb(255, 128, 128),
272px 17px 0 rgb(255, 128, 128),
289px 17px 0 rgb(255, 128, 128),
17px 34px 0 rgb(255, 128, 128),
34px 34px 0 rgb(255, 128, 128),
51px 34px 0 rgb(255, 128, 128),
68px 34px 0 rgb(255, 128, 128),
85px 34px 0 rgb(255, 128, 128),
102px 34px 0 rgb(255, 128, 128),
119px 34px 0 rgb(255, 128, 128),
136px 34px 0 rgb(255, 128, 128),
153px 34px 0 rgb(255, 128, 128),
170px 34px 0 rgb(255, 128, 128),
187px 34px 0 rgb(255, 128, 128),
204px 34px 0 rgb(255, 128, 128),
221px 34px 0 rgb(255, 128, 128),
238px 34px 0 rgb(255, 128, 128),
255px 34px 0 rgb(255, 128, 128),
272px 34px 0 rgb(255, 128, 128),
289px 34px 0 rgb(255, 128, 128),
17px 51px 0 rgb(255, 128, 128),
34px 51px 0 rgb(255, 128, 128),
51px 51px 0 rgb(255, 128, 128),
68px 51px 0 rgb(255, 128, 128),
85px 51px 0 rgb(255, 128, 128),
102px 51px 0 rgb(255, 128, 128),
119px 51px 0 rgb(255, 128, 128),
136px 51px 0 rgb(255, 128, 128),
153px 51px 0 rgb(255, 128, 128),
170px 51px 0 rgb(255, 128, 128),
187px 51px 0 rgb(255, 128, 128),
204px 51px 0 rgb(255, 128, 128),
221px 51px 0 rgb(255, 128, 128),
238px 51px 0 rgb(255, 128, 128),
255px 51px 0 rgb(255, 128, 128),
272px 51px 0 rgb(255, 128, 128),
289px 51px 0 rgb(255, 128, 128),
17px 68px 0 rgb(255, 128, 128),
34px 68px 0 rgb(255, 128, 128),
51px 68px 0 rgb(0, 0, 0),
68px 68px 0 rgb(0, 0, 0),
85px 68px 0 rgb(255, 128, 128),
102px 68px 0 rgb(255, 128, 128),
119px 68px 0 rgb(255, 128, 128),
136px 68px 0 rgb(255, 128, 128),
153px 68px 0 rgb(255, 128, 128),
170px 68px 0 rgb(255, 128, 128),
187px 68px 0 rgb(255, 128, 128),
204px 68px 0 rgb(255, 128, 128),
221px 68px 0 rgb(255, 128, 128),
238px 68px 0 rgb(0, 0, 0),
255px 68px 0 rgb(0, 0, 0),
272px 68px 0 rgb(255, 128, 128),
289px 68px 0 rgb(255, 128, 128),
17px 85px 0 rgb(255, 128, 128),
34px 85px 0 rgb(0, 0, 0),
51px 85px 0 rgb(0, 0, 0),
68px 85px 0 rgb(0, 0, 0),
85px 85px 0 rgb(0, 0, 0),
102px 85px 0 rgb(255, 128, 128),
119px 85px 0 rgb(255, 128, 128),
136px 85px 0 rgb(255, 128, 128),
153px 85px 0 rgb(255, 128, 128),
170px 85px 0 rgb(255, 128, 128),
187px 85px 0 rgb(255, 128, 128),
204px 85px 0 rgb(255, 128, 128),
221px 85px 0 rgb(0, 0, 0),
238px 85px 0 rgb(0, 0, 0),
255px 85px 0 rgb(0, 0, 0),
272px 85px 0 rgb(0, 0, 0),
289px 85px 0 rgb(255, 128, 128),
17px 102px 0 rgb(0, 0, 0),
34px 102px 0 rgb(0, 0, 0),
51px 102px 0 rgb(0, 0, 0),
68px 102px 0 rgb(0, 0, 0),
85px 102px 0 rgb(0, 0, 0),
102px 102px 0 rgb(255, 128, 128),
119px 102px 0 rgb(255, 255, 255),
136px 102px 0 rgb(255, 255, 255),
153px 102px 0 rgb(255, 255, 255),
170px 102px 0 rgb(255, 255, 255),
187px 102px 0 rgb(255, 255, 255),
204px 102px 0 rgb(255, 128, 128),
221px 102px 0 rgb(0, 0, 0),
238px 102px 0 rgb(0, 0, 0),
255px 102px 0 rgb(0, 0, 0),
272px 102px 0 rgb(0, 0, 0),
289px 102px 0 rgb(0, 0, 0),
17px 119px 0 rgb(0, 0, 0),
34px 119px 0 rgb(0, 0, 0),
51px 119px 0 rgb(0, 0, 0),
68px 119px 0 rgb(0, 0, 0),
85px 119px 0 rgb(255, 255, 255),
102px 119px 0 rgb(255, 255, 255),
119px 119px 0 rgb(255, 255, 255),
136px 119px 0 rgb(255, 255, 255),
153px 119px 0 rgb(255, 255, 255),
170px 119px 0 rgb(255, 255, 255),
187px 119px 0 rgb(255, 255, 255),
204px 119px 0 rgb(255, 255, 255),
221px 119px 0 rgb(255, 255, 255),
238px 119px 0 rgb(0, 0, 0),
255px 119px 0 rgb(0, 0, 0),
272px 119px 0 rgb(0, 0, 0),
289px 119px 0 rgb(0, 0, 0),
17px 136px 0 rgb(255, 128, 128),
34px 136px 0 rgb(0, 0, 0),
51px 136px 0 rgb(0, 0, 0),
68px 136px 0 rgb(255, 255, 255),
85px 136px 0 rgb(255, 255, 255),
102px 136px 0 rgb(255, 255, 255),
119px 136px 0 rgb(255, 255, 255),
136px 136px 0 rgb(255, 255, 255),
153px 136px 0 rgb(255, 255, 255),
170px 136px 0 rgb(255, 255, 255),
187px 136px 0 rgb(255, 255, 255),
204px 136px 0 rgb(255, 255, 255),
221px 136px 0 rgb(255, 255, 255),
238px 136px 0 rgb(255, 255, 255),
255px 136px 0 rgb(0, 0, 0),
272px 136px 0 rgb(0, 0, 0),
289px 136px 0 rgb(255, 128, 128),
17px 153px 0 rgb(255, 128, 128),
34px 153px 0 rgb(255, 128, 128),
51px 153px 0 rgb(255, 255, 255),
68px 153px 0 rgb(255, 255, 255),
85px 153px 0 rgb(255, 255, 255),
102px 153px 0 rgb(255, 255, 255),
119px 153px 0 rgb(255, 255, 255),
136px 153px 0 rgb(255, 255, 255),
153px 153px 0 rgb(255, 255, 255),
170px 153px 0 rgb(255, 255, 255),
187px 153px 0 rgb(255, 255, 255),
204px 153px 0 rgb(255, 255, 255),
221px 153px 0 rgb(255, 255, 255),
238px 153px 0 rgb(255, 255, 255),
255px 153px 0 rgb(255, 255, 255),
272px 153px 0 rgb(255, 128, 128),
289px 153px 0 rgb(255, 128, 128),
17px 170px 0 rgb(255, 128, 128),
34px 170px 0 rgb(255, 128, 128),
51px 170px 0 rgb(255, 255, 255),
68px 170px 0 rgb(255, 255, 255),
85px 170px 0 rgb(255, 255, 255),
102px 170px 0 rgb(0, 0, 0),
119px 170px 0 rgb(0, 0, 0),
136px 170px 0 rgb(255, 255, 255),
153px 170px 0 rgb(255, 255, 255),
170px 170px 0 rgb(255, 255, 255),
187px 170px 0 rgb(0, 0, 0),
204px 170px 0 rgb(0, 0, 0),
221px 170px 0 rgb(255, 255, 255),
238px 170px 0 rgb(255, 255, 255),
255px 170px 0 rgb(255, 255, 255),
272px 170px 0 rgb(255, 128, 128),
289px 170px 0 rgb(255, 128, 128),
17px 187px 0 rgb(255, 128, 128),
34px 187px 0 rgb(255, 128, 128),
51px 187px 0 rgb(255, 255, 255),
68px 187px 0 rgb(255, 255, 255),
85px 187px 0 rgb(0, 0, 0),
102px 187px 0 rgb(0, 0, 0),
119px 187px 0 rgb(0, 0, 0),
136px 187px 0 rgb(255, 255, 255),
153px 187px 0 rgb(255, 255, 255),
170px 187px 0 rgb(255, 255, 255),
187px 187px 0 rgb(0, 0, 0),
204px 187px 0 rgb(0, 0, 0),
221px 187px 0 rgb(0, 0, 0),
238px 187px 0 rgb(255, 255, 255),
255px 187px 0 rgb(255, 255, 255),
272px 187px 0 rgb(255, 128, 128),
289px 187px 0 rgb(255, 128, 128),
17px 204px 0 rgb(255, 128, 128),
34px 204px 0 rgb(255, 255, 255),
51px 204px 0 rgb(255, 255, 255),
68px 204px 0 rgb(255, 255, 255),
85px 204px 0 rgb(0, 0, 0),
102px 204px 0 rgb(0, 0, 0),
119px 204px 0 rgb(0, 0, 0),
136px 204px 0 rgb(255, 255, 255),
153px 204px 0 rgb(255, 255, 255),
170px 204px 0 rgb(255, 255, 255),
187px 204px 0 rgb(0, 0, 0),
204px 204px 0 rgb(0, 0, 0),
221px 204px 0 rgb(0, 0, 0),
238px 204px 0 rgb(255, 255, 255),
255px 204px 0 rgb(255, 255, 255),
272px 204px 0 rgb(255, 255, 255),
289px 204px 0 rgb(255, 128, 128),
17px 221px 0 rgb(255, 128, 128),
34px 221px 0 rgb(255, 255, 255),
51px 221px 0 rgb(255, 255, 255),
68px 221px 0 rgb(255, 255, 255),
85px 221px 0 rgb(0, 0, 0),
102px 221px 0 rgb(0, 0, 0),
119px 221px 0 rgb(255, 255, 255),
136px 221px 0 rgb(255, 255, 255),
153px 221px 0 rgb(255, 255, 255),
170px 221px 0 rgb(255, 255, 255),
187px 221px 0 rgb(255, 255, 255),
204px 221px 0 rgb(0, 0, 0),
221px 221px 0 rgb(0, 0, 0),
238px 221px 0 rgb(255, 255, 255),
255px 221px 0 rgb(255, 255, 255),
272px 221px 0 rgb(255, 255, 255),
289px 221px 0 rgb(255, 128, 128),
17px 238px 0 rgb(255, 128, 128),
34px 238px 0 rgb(255, 255, 255),
51px 238px 0 rgb(255, 255, 255),
68px 238px 0 rgb(255, 255, 255),
85px 238px 0 rgb(255, 255, 255),
102px 238px 0 rgb(255, 255, 255),
119px 238px 0 rgb(255, 255, 255),
136px 238px 0 rgb(0, 0, 0),
153px 238px 0 rgb(0, 0, 0),
170px 238px 0 rgb(0, 0, 0),
187px 238px 0 rgb(255, 255, 255),
204px 238px 0 rgb(255, 255, 255),
221px 238px 0 rgb(255, 255, 255),
238px 238px 0 rgb(255, 255, 255),
255px 238px 0 rgb(255, 255, 255),
272px 238px 0 rgb(255, 255, 255),
289px 238px 0 rgb(255, 128, 128),
17px 255px 0 rgb(255, 128, 128),
34px 255px 0 rgb(255, 255, 255),
51px 255px 0 rgb(255, 255, 255),
68px 255px 0 rgb(255, 255, 255),
85px 255px 0 rgb(255, 255, 255),
102px 255px 0 rgb(255, 255, 255),
119px 255px 0 rgb(255, 255, 255),
136px 255px 0 rgb(255, 255, 255),
153px 255px 0 rgb(0, 0, 0),
170px 255px 0 rgb(255, 255, 255),
187px 255px 0 rgb(255, 255, 255),
204px 255px 0 rgb(255, 255, 255),
221px 255px 0 rgb(255, 255, 255),
238px 255px 0 rgb(255, 255, 255),
255px 255px 0 rgb(255, 255, 255),
272px 255px 0 rgb(255, 255, 255),
289px 255px 0 rgb(255, 128, 128),
17px 272px 0 rgb(255, 128, 128),
34px 272px 0 rgb(255, 128, 128),
51px 272px 0 rgb(255, 255, 255),
68px 272px 0 rgb(255, 255, 255),
85px 272px 0 rgb(255, 255, 255),
102px 272px 0 rgb(255, 255, 255),
119px 272px 0 rgb(255, 255, 255),
136px 272px 0 rgb(255, 255, 255),
153px 272px 0 rgb(255, 255, 255),
170px 272px 0 rgb(255, 255, 255),
187px 272px 0 rgb(255, 255, 255),
204px 272px 0 rgb(255, 255, 255),
221px 272px 0 rgb(255, 255, 255),
238px 272px 0 rgb(255, 255, 255),
255px 272px 0 rgb(255, 255, 255),
272px 272px 0 rgb(255, 128, 128),
289px 272px 0 rgb(255, 128, 128),
17px 289px 0 rgb(255, 128, 128),
34px 289px 0 rgb(255, 128, 128),
51px 289px 0 rgb(255, 128, 128),
68px 289px 0 rgb(255, 255, 255),
85px 289px 0 rgb(255, 255, 255),
102px 289px 0 rgb(255, 255, 255),
119px 289px 0 rgb(255, 255, 255),
136px 289px 0 rgb(255, 255, 255),
153px 289px 0 rgb(255, 255, 255),
170px 289px 0 rgb(255, 255, 255),
187px 289px 0 rgb(255, 255, 255),
204px 289px 0 rgb(255, 255, 255),
221px 289px 0 rgb(255, 255, 255),
238px 289px 0 rgb(255, 255, 255),
255px 289px 0 rgb(255, 128, 128),
272px 289px 0 rgb(255, 128, 128),
289px 289px 0 rgb(255, 128, 128);
}
Also see: Tab Triggers