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='mushroom'>
</div>
body{
display: flex;
align-items: center;
height: 60vh;
margin-left: 10%;
}
.mushroom{
height: 20px;
width: 20px;
box-shadow:
20px 0 0 #FFF, 40px 0 0 #FFF, 60px 0 0 #FFF, 80px 0 0 #FFF, 100px 0 0 #FFF, 120px 0 0 #000, 140px 0 0 #000, 160px 0 0 #000, 180px 0 0 #000, 200px 0 0 #000, 220px 0 0 #FFF, 240px 0 0 #FFF, 260px 0 0 #FFF, 280px 0 0 #FFF, 300px 0 0 #FFF,
20px 20px 0 #FFF, 40px 20px 0 #FFF, 60px 20px 0 #FFF, 80px 20px 0 #000, 100px 20px 0 #000, 120px 20px 0 #000, 140px 20px 0 #FFF, 160px 20px 0 #F00, 180px 20px 0 #FFF, 200px 20px 0 #000, 220px 20px 0 #000, 240px 20px 0 #000, 260px 20px 0 #FFF, 280px 20px 0 #FFF, 300px 20px 0 #FFF,
20px 40px 0 #FFF, 40px 40px 0 #FFF, 60px 40px 0 #000, 80px 40px 0 #000, 100px 40px 0 #FFF, 120px 40px 0 #FFF, 140px 40px 0 #FFF, 160px 40px 0 #F00, 180px 40px 0 #FFF, 200px 40px 0 #FFF, 220px 40px 0 #FFF, 240px 40px 0 #000, 260px 40px 0 #000, 280px 40px 0 #FFF, 300px 40px 0 #FFF,
20px 60px 0 #FFF, 40px 60px 0 #000, 60px 60px 0 #000, 80px 60px 0 #F00, 100px 60px 0 #F00, 120px 60px 0 #F00, 140px 60px 0 #F00, 160px 60px 0 #F00, 180px 60px 0 #F00, 200px 60px 0 #F00, 220px 60px 0 #F00, 240px 60px 0 #F00, 260px 60px 0 #000, 280px 60px 0 #000, 300px 60px 0 #FFF,
20px 80px 0 #000, 40px 80px 0 #000, 60px 80px 0 #FFF, 80px 80px 0 #F00, 100px 80px 0 #F00, 120px 80px 0 #F00, 140px 80px 0 #FFF, 160px 80px 0 #FFF, 180px 80px 0 #FFF, 200px 80px 0 #F00, 220px 80px 0 #F00, 240px 80px 0 #F00, 260px 80px 0 #FFF, 280px 80px 0 #000, 300px 80px 0 #000,
20px 100px 0 #000, 40px 100px 0 #FFF, 60px 100px 0 #FFF, 80px 100px 0 #FFF, 100px 100px 0 #F00, 120px 100px 0 #FFF, 140px 100px 0 #FFF, 160px 100px 0 #FFF, 180px 100px 0 #FFF, 200px 100px 0 #FFF, 220px 100px 0 #F00, 240px 100px 0 #FFF, 260px 100px 0 #FFF, 280px 100px 0 #FFF, 300px 100px 0 #000,
20px 120px 0 #000, 40px 120px 0 #FFF, 60px 120px 0 #FFF, 80px 120px 0 #FFF, 100px 120px 0 #F00, 120px 120px 0 #FFF, 140px 120px 0 #FFF, 160px 120px 0 #FFF, 180px 120px 0 #FFF, 200px 120px 0 #FFF, 220px 120px 0 #F00, 240px 120px 0 #FFF, 260px 120px 0 #FFF, 280px 120px 0 #FFF, 300px 120px 0 #000,
20px 140px 0 #000, 40px 140px 0 #FFF, 60px 140px 0 #FFF, 80px 140px 0 #F00, 100px 140px 0 #F00, 120px 140px 0 #FFF, 140px 140px 0 #FFF, 160px 140px 0 #FFF, 180px 140px 0 #FFF, 200px 140px 0 #FFF, 220px 140px 0 #F00, 240px 140px 0 #F00, 260px 140px 0 #FFF, 280px 140px 0 #FFF, 300px 140px 0 #000,
20px 160px 0 #000, 40px 160px 0 #F00, 60px 160px 0 #F00, 80px 160px 0 #F00, 100px 160px 0 #F00, 120px 160px 0 #F00, 140px 160px 0 #FFF, 160px 160px 0 #FFF, 180px 160px 0 #FFF, 200px 160px 0 #F00, 220px 160px 0 #F00, 240px 160px 0 #F00, 260px 160px 0 #F00, 280px 160px 0 #F00, 300px 160px 0 #000,
20px 180px 0 #000, 40px 180px 0 #F00, 60px 180px 0 #F00, 80px 180px 0 #000, 100px 180px 0 #000, 120px 180px 0 #000, 140px 180px 0 #000, 160px 180px 0 #000, 180px 180px 0 #000, 200px 180px 0 #000, 220px 180px 0 #000, 240px 180px 0 #000, 260px 180px 0 #F00, 280px 180px 0 #F00, 300px 180px 0 #000,
20px 200px 0 #000, 40px 200px 0 #000, 60px 200px 0 #000, 80px 200px 0 #000, 100px 200px 0 #FFF, 120px 200px 0 #FFF, 140px 200px 0 #000, 160px 200px 0 #FFF, 180px 200px 0 #000, 200px 200px 0 #FFF, 220px 200px 0 #FFF, 240px 200px 0 #000, 260px 200px 0 #000, 280px 200px 0 #000, 300px 200px 0 #000,
20px 220px 0 #FFF, 40px 220px 0 #000, 60px 220px 0 #000, 80px 220px 0 #FFF, 100px 220px 0 #FFF, 120px 220px 0 #FFF, 140px 220px 0 #000, 160px 220px 0 #FFF, 180px 220px 0 #000, 200px 220px 0 #FFF, 220px 220px 0 #FFF, 240px 220px 0 #FFF, 260px 220px 0 #000, 280px 220px 0 #000, 300px 220px 0 #FFF,
20px 240px 0 #FFF, 40px 240px 0 #FFF, 60px 240px 0 #000, 80px 240px 0 #FFF, 100px 240px 0 #FFF, 120px 240px 0 #FFF, 140px 240px 0 #FFF, 160px 240px 0 #FFF, 180px 240px 0 #FFF, 200px 240px 0 #FFF, 220px 240px 0 #FFF, 240px 240px 0 #FFF, 260px 240px 0 #000, 280px 240px 0 #FFF, 300px 240px 0 #FFF,
20px 260px 0 #FFF, 40px 260px 0 #FFF, 60px 260px 0 #000, 80px 260px 0 #000, 100px 260px 0 #FFF, 120px 260px 0 #FFF, 140px 260px 0 #FFF, 160px 260px 0 #FFF, 180px 260px 0 #FFF, 200px 260px 0 #FFF, 220px 260px 0 #FFF, 240px 260px 0 #000, 260px 260px 0 #000, 280px 260px 0 #FFF, 300px 260px 0 #FFF,
20px 280px 0 #FFF, 40px 280px 0 #FFF, 60px 280px 0 #FFF, 80px 280px 0 #FFF, 100px 280px 0 #000, 120px 280px 0 #000, 140px 280px 0 #000, 160px 280px 0 #000, 180px 280px 0 #000, 200px 280px 0 #000, 220px 280px 0 #000, 240px 280px 0 #FFF, 260px 280px 0 #FFF, 280px 280px 0 #FFF, 300px 280px 0 #FFF
/* ,
20px 280px 0 #FFF, 40px 300px 0 #FFF, 60px 300px 0 #FFF, 80px 300px 0 #FFF, 100px 300px 0 #000, 120px 300px 0 #000, 140px 300px 0 #000, 160px 300px 0 #000, 180px 300px 0 #000, 200px 300px 0 #000, 220px 300px 0 #000, 240px 300px 0 #FFF, 260px 300px 0 #FFF, 280px 300px 0 #FFF, 300px 300px 0 #FFF; */;
}
Also see: Tab Triggers