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.
<svg style="position:absolute;left:50%;top:50%;margin-left:-25px;margin-top:-25px" width="50px" height="50px" viewBox="0 0 99 98" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
<path d="M53.7692923,17.1075345 L61.0241389,9.76750716 L63.4323415,7.58279306 L63.4323429,7.58279465 C64.2325861,6.8568165 65.1570157,6.28086882 66.1613821,5.88252048 C74.4135151,2.60958817 81.5072458,3.90458372 87.4425744,9.76750716 C93.0687101,15.3250095 95.1029079,21.7593611 93.545168,29.0705619 L93.5451701,29.0705624 C93.1913384,30.7312596 92.374936,32.2579859 91.1902608,33.4743975 L89.047178,35.6748916 L38.009561,87.1142438 L35.126683,89.9525979 L35.1266835,89.9525985 C33.8268154,91.2323912 32.2016458,92.1322524 30.4271022,92.5547706 C20.6306449,94.8873037 13.3982127,93.0737948 8.72980551,87.1142438 C3.93133156,80.9886534 3.37583888,73.6269834 7.06332746,65.0292339 L7.06332716,65.0292337 C7.51692325,63.971629 8.16913746,63.0108277 8.98463176,62.1988879 L12.8607615,58.3396528 L39.2112587,31.9966185 L39.485664,31.7224701 L39.4856609,31.7224671 C41.6986427,29.5115576 44.8187125,28.4635881 47.9176309,28.8903358 C50.7823491,29.2848322 53.0890172,30.467936 54.8376352,32.4396475 C56.3624948,34.1590528 57.4219801,36.0803006 58.0160912,38.203391 L58.0160942,38.2033901 C58.8535932,41.1962413 58.0877483,44.409406 55.9903113,46.7027269 L55.7834431,46.928915 L31.5236535,71.4708726" id="Line-4" stroke="#979797" stroke-width="8"></path>
</g>
<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="square">
<path class="path" d="M53.7692923,17.1075345 L61.0241389,9.76750716 L63.4323415,7.58279306 L63.4323429,7.58279465 C64.2325861,6.8568165 65.1570157,6.28086882 66.1613821,5.88252048 C74.4135151,2.60958817 81.5072458,3.90458372 87.4425744,9.76750716 C93.0687101,15.3250095 95.1029079,21.7593611 93.545168,29.0705619 L93.5451701,29.0705624 C93.1913384,30.7312596 92.374936,32.2579859 91.1902608,33.4743975 L89.047178,35.6748916 L38.009561,87.1142438 L35.126683,89.9525979 L35.1266835,89.9525985 C33.8268154,91.2323912 32.2016458,92.1322524 30.4271022,92.5547706 C20.6306449,94.8873037 13.3982127,93.0737948 8.72980551,87.1142438 C3.93133156,80.9886534 3.37583888,73.6269834 7.06332746,65.0292339 L7.06332716,65.0292337 C7.51692325,63.971629 8.16913746,63.0108277 8.98463176,62.1988879 L12.8607615,58.3396528 L39.2112587,31.9966185 L39.485664,31.7224701 L39.4856609,31.7224671 C41.6986427,29.5115576 44.8187125,28.4635881 47.9176309,28.8903358 C50.7823491,29.2848322 53.0890172,30.467936 54.8376352,32.4396475 C56.3624948,34.1590528 57.4219801,36.0803006 58.0160912,38.203391 L58.0160942,38.2033901 C58.8535932,41.1962413 58.0877483,44.409406 55.9903113,46.7027269 L55.7834431,46.928915 L31.5236535,71.4708726" id="Line-4" stroke="#000000" stroke-width="8"></path>
</g>
<g class="number">
<circle id="Oval" fill="#FFFFFF" cx="25" cy="31" r="31"></circle>
<circle id="Oval" fill="#000000" cx="25.5" cy="30.5" r="22.5"></circle>
<text id="1" font-family="IRANSans-Bold, IRANSans" font-size="36" font-weight="bold" fill="#FFFFFF">
<tspan x="13.7426087" y="41">1</tspan>
</text>
</g>
</svg>
.path {
stroke-dashoffset: 1000;
stroke-dasharray: 1000;
animation: dash 5s ease-in-out;
animation-delay:2s;
animation-fill-mode: forwards;
}
@keyframes dash {
to{
stroke-dashoffset: 0;
}
}
.number{
transform:scale(0);
animation: scale 0.2s ease-in-out;
animation-delay:4s;
animation-fill-mode: forwards;
}
@keyframes scale {
to{
transform:scale(0.9);
}
}
Also see: Tab Triggers