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 class="svg" viewBox="0 0 136 129" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g class="small" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g class="money-cellphone-mobile-screen-ten" transform="translate(-119.000000, -173.000000)">
<g class="talk-bubble" transform="translate(123.000000, 177.000000)">
<path class="talk" d="M128.379649,36.8385023 C128.379649,16.5271863 112.848788,0 92.6096029,0 L36.7135981,0 C16.4744133,0 0,16.5271863 0,36.8385023 L0,46.8948269 C0,62.7408699 10.0393905,76.7705307 24.98525,81.8034232 L26.4571907,82.29536 L25.6834783,83.638726 C23.6925841,87.0917444 20.9845906,92.5125101 17.4085295,100.213214 C16.9744957,101.140326 17.1726416,102.247184 17.8897409,102.966168 C18.5974047,103.675693 19.7391023,103.88382 20.626041,103.467566 L63.6425646,83.7427896 L90.7413705,83.7427896 C110.980555,83.7427896 128.39852,67.2156033 128.39852,46.9042873 L128.379649,36.8385023 L128.379649,36.8385023 L128.379649,36.8385023 Z" id="bubble-outline" stroke="#000000" stroke-width="7" fill="#FFFFFF"></path>
</g>
</g>
<g class="bubble-big">
<path class="left" d="M36.4399681,35.778946 C32.628019,35.778946 29.5237338,38.8913927 29.5237338,42.7133637 C29.5237338,46.5353346 32.628019,49.6477813 36.4399681,49.6477813 C40.2519171,49.6477813 43.3562023,46.5353346 43.3562023,42.7133637 C43.3562023,38.8913927 40.2519171,35.778946 36.4399681,35.778946 L36.4399681,35.778946 Z" id="left-circle" fill="#FF5252"></path>
<path class="middle" d="M65.1333764,35.778946 C61.3214273,35.778946 58.2171421,38.8913927 58.2171421,42.7133637 C58.2171421,46.5353346 61.3214273,49.6477813 65.1333764,49.6477813 C68.9453254,49.6477813 72.0496106,46.5353346 72.0496106,42.7133637 C72.0590461,38.8913927 68.9547609,35.778946 65.1333764,35.778946 L65.1333764,35.778946 Z" id="middle-circle" fill="#FF5252"></path>
<path class="right" d="M93.8267847,35.778946 C90.0148356,35.778946 86.9105504,38.8913927 86.9105504,42.7133637 C86.9105504,46.5353346 90.0148356,49.6477813 93.8267847,49.6477813 C97.6387337,49.6477813 100.743019,46.5353346 100.743019,42.7133637 C100.752454,38.8913927 97.6481692,35.778946 93.8267847,35.778946 L93.8267847,35.778946 Z" id="right-circle" fill="#FF5252"></path>
</g>
</g>
<ellipse id="shadow" fill="#000000" opacity="0.0817397388" cx="63" cy="122.5" rx="30" ry="2.5"></ellipse>
</svg>
.svg{
width:20%;
margin-left:40%;
margin-top:5%;
@keyframes bubble-big {
0% {fill: #000}
20% {fill: #fbcb43}
40%, 100% {fill: #000}
}
.bubble-big {
animation: bubble-big 2.5s ease infinite;
}
Also see: Tab Triggers