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 id="social" class="fb-ico" width="40px" height="40px" viewBox="0 0 79 79">
<defs>
<style type="text/css">
.fill {fill:#000 ;fill-rule:nonzero}
</style>
</defs>
<g id="facebook">
<path class="fill" d="M52 15l-6 0c-8,0 -12,4 -12,12l0 5 -7 0c0,0 -1,1 -1,1l0 8c0,1 1,1 1,1l7 0 0 21c0,0 0,1 1,1l8 0c1,0 1,-1 1,-1l0 -21 8 0c0,0 1,0 1,-1l0 -8c0,0 0,0 -1,0 0,-1 0,-1 0,-1l-8 0 0 -4c0,-3 1,-4 4,-4l4 0c0,0 1,0 1,-1l0 -7c0,-1 -1,-1 -1,-1z"/>
</g>
</svg>
<svg id="social" class="vk-ico" width="40px" height="40px" viewBox="0 0 190 190">
<defs>
<style type="text/css">
.fill {fill:#000 ;fill-rule:nonzero}
</style>
</defs>
<g id="vkontakte">
<path class="fill" d="M162 130c0,-1 0,-1 0,-1 -3,-5 -7,-10 -14,-16l0 0 0 0 0 0 0 0c-3,-3 -5,-5 -6,-6 -1,-2 -2,-4 -1,-6 1,-1 3,-4 7,-9 1,-2 3,-4 4,-6 8,-11 12,-18 11,-21l-1 -1c0,0 -1,0 -2,-1 -1,0 -3,0 -4,0l-21 0c0,0 -1,0 -1,0 -1,0 -1,1 -1,1l0 0 -1 0c0,0 0,0 -1,1 0,0 0,0 0,1 -2,6 -5,11 -8,16 -2,3 -3,5 -5,7 -1,3 -2,4 -3,5 -1,1 -2,2 -3,3 -1,0 -1,0 -2,0 0,0 -1,0 -1,0 -1,0 -1,-1 -2,-2 0,0 0,-1 0,-2 -1,-1 -1,-2 -1,-3 0,-1 0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<g id="instagram">
<path class="fill" d="M259 74l-113 0c-38,0 -69,31 -69,69l0 113c0,39 31,70 69,70l113 0c39,0 70,-31 70,-70l0 -113c0,-38 -31,-69 -70,-69zm11 42c-4,0 -8,2 -11,5 -3,3 -5,7 -5,11 0,5 2,9 5,12 3,3 7,5 11,5 5,0 9,-2 12,-5 3,-3 5,-7 5,-12 0,-4 -2,-8 -5,-11 -3,-3 -7,-5 -12,-5zm-67 19c-36,0 -65,29 -65,65 0,36 29,65 65,65 36,0 65,-29 65,-65 0,-36 -29,-65 -65,-65zm0 107c-24,0 -43,-19 -43,-42 0,-24 19,-43 43,-43 23,0 42,19 42,43 0,23 -19,42 -42,42zm103 14c0,26 -21,48 -47,48l-113 0c-26,0 -47,-22 -47,-48l0 -113c0,-26 21,-47 47,-47l113 0c26,0 47,21 47,47l0 113z"/>
</g>
</svg>
<svg id="social" class="yt-ico" width="40px" height="40px" viewBox="0 0 115 115">
<defs>
<style type="text/css">
.fill {fill:#000 ;fill-rule:nonzero}
</style>
</defs>
<g id="youtube">
<path class="fill" d="M78 73l-4 0 0 -2c0,-1 1,-2 2,-2l0 0c1,0 2,1 2,2l0 2zm-15 -5c-1,0 -1,1 -1,2l0 11c0,1 0,1 1,1 1,0 2,0 2,-1l0 -11c0,-1 -1,-2 -2,-2zm24 -6l0 21c0,5 -4,9 -9,9l-41 0c-5,0 -9,-4 -9,-9l0 -21c0,-5 4,-9 9,-9l41 0c5,0 9,4 9,9zm-47 23l0 -22 5 0 0 -3 -13 0 0 3 4 0 0 22 4 0zm15 -18l-4 0 0 11c0,2 0,3 0,3 0,1 -2,2 -3,0 0,0 0,-1 0,-2l0 -12 -4 0 0 11c0,2 0,3 0,4 0,1 0,2 1,3 2,1 6,0 7,-2l0 2 3 0 0 -18 0 0zm13 13l0 -10c0,-3 -3,-6 -6,-3l0 -7 -5 0 0 25 4 0 0 -1c5,4 7,1 7,-4zm13 -1l-3 0c0,0 0,0 0,0l0 2c0,1 -1,2 -2,2l0 0c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