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 xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886">
<g fill="none" fill-rule="evenodd">
<!--bg -->
<image href="https://assets.codepen.io/86170/smashing-2025-03-7.webp" />
<g><path fill="#DEBB8C" stroke="#000" stroke-linecap="round" stroke-width="5" d="M740 530c5.556-36.976 7.223-65.643 5-86s-10.223-49.69-24-88c26.667-10 43.333-25 50-45 10-30 14-66 0-71s-53.901 40.79-72 36c-12.066-3.194-21.066-23.527-27-61l-176 5c-13.723 64.545-20.056 107.211-19 128 2.35 46.246 26.851 62.11 38 86 18.667 40 34.333 74 47 102 38.82 7.358 68.487 10.691 89 10 20.513-.691 50.18-6.025 89-16Z"/><path fill="#78781A" stroke="#000" stroke-linecap="round" stroke-width="5" d="M562 536c31.721 8.046 58.388 11.712 80 11 21.612-.712 55.612-6.38 102-17 13.857 84.564 22.857 155.23 27 212 4.143 56.77 4.143 109.436 0 158H503l24-222-17-51 42-49 10-42Z"/><path fill="#FFF" stroke="#000" stroke-linecap="round" stroke-width="5" d="m292 634 204-23c3.988-1.32 8.655 4.014 14 16 5.345 11.986 11.679 31.32 19 58l36 99 14 54c-27.295-8.664-50.295-13.664-69-15-18.705-1.336-47.038-.003-85 4v-70c-.555-13.022-1.888-22.022-4-27-2.112-4.978-5.445-6.978-10-6 4.554-13.29 5.887-21.956 4-26-1.887-4.044-7.887-5.377-18-4-3.805-11.588-7.805-17.921-12-19-4.195-1.079-11.862 2.255-23 10l-70-51Z"/><path stroke="#000" stroke-linecap="round" stroke-width="5" d="m552 578 27 14 28-42 16 47 126-30"/><path fill="#000" d="m607 550-20 30 7 17-28 66 51 15-10-78 10-20z"/><path fill="#E18000" stroke="#000" stroke-linecap="round" stroke-width="5" d="m639 636 24 26 10-21 15 18 23-18c.407 20.857-.593 36.523-3 47-2.407 10.477-7.073 19.477-14 27l-60-31c-.639-8.536-.639-15.87 0-22 .639-6.13 2.305-14.798 5-26Z"/><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M600 752c21.964 21.343 37.297 37.01 46 47 22.52 25.849 38.23 49.74 54 54 17.326 4.68 31.911-10.757 49-30 4.988-5.617 13.321-13.617 25-24"/><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M622 773c13.555-21.554 23.221-37.887 29-49s9.112-19.78 10-26m33 17c11.373.133 20.706-2.867 28-9 7.294-6.133 12.627-15.467 16-28M552 578l-14 88"/><path fill="#DEBB8C" stroke="#000" stroke-linecap="round" stroke-width="5" d="M362 685c-11.23 19.716-16.23 32.716-15 39 1.23 6.284 9.23 8.617 24 7-2.652 13.704-2.652 22.37 0 26 2.652 3.63 8.986 3.63 19 0-.293 11.233 1.707 18.566 6 22 4.293 3.434 13.96 5.434 29 6 1.763-25.65 1.763-42.316 0-50-1.763-7.684-6.43-11.35-14-11 4.32-13.79 5.654-22.456 4-26-1.654-3.544-7.654-4.878-18-4 0-12-3.333-18-10-18s-15 3-25 9Zm272 0c-28.572-12.462-49.239-19.796-62-22-12.761-2.204-28.761-1.204-48 3l5 19c-26.243 12.66-42.243 22.66-48 30-5.757 7.34-3.09 14.34 8 21-2.568 7.273-1.568 12.607 3 16 4.568 3.393 15.234 6.727 32 10 3.333 15.333 15 21 35 17s33.667-13 41-27l34-67Z"/><path fill="#000" d="M508 871h30v29h-35zM548 871h74v29h-74zM634 900v-22l53-3v25zM774 871l-73 4-3 25h73z"/><path fill="#78781A" stroke="#000" stroke-linecap="round" stroke-width="5" d="M414 202c77.705 1.472 136.039 1.472 175 0 38.961-1.472 95.295-5.806 169-13l-5 23-336 12-3-22Z"/><path fill="#78781A" stroke="#000" stroke-linecap="round" stroke-width="5" d="m499 201.986-14-56.46c19.511 5.876 33.511 7.7 42 5.474 25.402-6.663 45.754-28 61-28 15.266 0 41 28 61 28 14.667 0 28.333-1.825 41-5.474l-11 50.3c-40.98 3.388-71.98 5.44-93 6.16-21.02.72-50.02.72-87 0Z"/><path fill="#000" d="M493 178h189l-3 18c-40.463 3.885-70.796 6.219-91 7-20.204.781-50.204.781-90 0l-5-25Z"/><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M546 163c9.771-.756 17.438-2.756 23-6 5.562-3.244 9.895-8.244 13-15m18 4c1.629 9.365 4.295 15.032 8 17s11.705 1.968 24 0"/><path fill="#000" d="m577 218 5 103h-18c-15.348-15.236-25.348-18.57-30-10-4.652 8.57-7.319 35.236-8 80l-20 26c-18.025-15.743-27.692-38.076-29-67-1.308-28.924 5.025-72.257 19-130l81-2ZM606 245l29-24 9 9-31 26z"/><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M628 546c-46-59.333-59.333-108-40-146 17.506-34.408 47.499-46.854 106-43 4.07.268 13.07-.065 27-1"/><path fill="#FFF" stroke="#000" stroke-linecap="round" stroke-width="5" d="M673 326c-10.816 6.431-26 3-37-22s-10.205-45.932 0-52c10.205-6.068 27 4 37 30s10.816 37.569 0 44Z"/><path fill="#000" d="M676.931 319.884c-5.37 3.194-12.91 1.49-18.373-10.924-5.462-12.415-5.067-22.81 0-25.822 5.067-3.013 13.407 1.986 18.373 14.897 4.966 12.91 5.371 18.656 0 21.85Z"/></g>
<g class="frame-1"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886"><g fill="none" fill-rule="evenodd"><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M686 358c3.408 14.485 7.408 25.485 12 33 4.592 7.515 11.592 14.515 21 21-12.498-.588-21.165-.588-26 0-3.945.48-18.73 4.776-22 5-9.285.636-17.618-.364-25-3m53 35c-2.09 6.16-4.09 10.494-6 13-1.91 2.506-5.243 5.173-10 8"/><path fill="#000" d="M646 414c10.663 2.227 18.663 3.227 24 3 5.337-.227 13.003-1.894 23-5-.835 8.395-.835 14.062 0 17 3.487 12.27 5.753 17-7 17-17.333 0-30.667-10.667-40-32Z"/></g></svg></g>
<g class="frame-2"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886"><g fill="none" fill-rule="evenodd"><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M686 358c3.408 14.485 7.408 25.485 12 33 4.592 7.515 11.592 14.515 21 21m-.992 1c-31.906 3.385-54.24 3.385-67 0-12.76-3.385-23.094-12.052-31-26"/><path fill="#000" d="M617.008 387c-.259 31.079 5.741 53.079 18 66 18.388 19.382 38 16 49 13s9.739-8.936 8-14c-3.027-8.817-12.258-19.806-13-25-1.168-8.177-1.501-11.844-1-11-14.623.437-26.29-1.23-35-5s-17.377-11.77-26-24Z"/></g></svg></g>
<g class="frame-3"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886"><g fill="none" fill-rule="evenodd"><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M686 358c3.408 14.485 7.408 25.485 12 33 4.592 7.515 11.592 14.515 21 21m-.992 1c-31.906 3.385-54.24 3.385-67 0M710 443c-4.636 5.578-8.636 9.578-12 12-3.364 2.422-7.697 4.422-13 6"/><path fill="#000" d="M650.109 411.58c12.957 3.51 22.587 4.983 28.891 4.42 6.272-.56 14.649-1.186 25.13-1.877a1 1 0 0 1 .938 1.484c-2.896 5.166-3.918 8.964-3.068 11.393.76 2.171 3.32 4.117 7.678 5.839v-.001a1 1 0 0 1-.168 1.91c-15.007 3.057-27.177 3.474-36.51 1.252-9.572-2.279-17.588-9.951-24.05-23.017l-.002.001a1 1 0 0 1 1.161-1.404Z"/></g></svg></g>
<g class="frame-4"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886"><g fill="none" fill-rule="evenodd"><path stroke="#000" stroke-linecap="round" stroke-width="5" d="M687 358c6.307 13.69 11.64 24.69 16 33a112.556 112.556 0 0 0 16 23c-13.068-1.017-23.734-1.017-32 0-12.398 1.526-12.102 12.12-33 8-13.932-2.747-26.598-10.08-38-22"/><path fill="#000" d="M614 400c1.333 20 10.667 34 28 42 16.539 7.633 34.898 7.983 55.079 1.05v-.001a2 2 0 0 0 .792-3.274L677 418c-9.833 3.35-18.167 4.016-25 2-6.833-2.016-19.5-8.683-38-20Z"/></g></svg></g>
<g class="frame-5"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886"><g fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-width="5"><path d="m687 357 32 62c-9.866-4.916-17.533-7.25-23-7-19.941.908-35 10-52 7-17.459-3.081-28.459-9.414-33-19"/><path d="M607 412c.316-4.958 1.65-8.958 4-12s6.684-6.376 13-10m84 25c-1.633 5.121-2.633 9.455-3 13s-.367 8.879 0 16"/></g></svg></g>
<g class="frame-6"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 886"><g fill="none" fill-rule="evenodd" stroke="#000" stroke-linecap="round" stroke-width="5"><path d="m687 357 32 62c-9.866-4.916-17.533-7.25-23-7-19.941.908-35 10-52 7-17.459-3.081-28.459-9.414-33-19"/><path d="M607 424c.316-12.958 1.65-20.958 4-24 2.35-3.042 6.684-6.376 13-10m84 25c1.333-1.333.333 3-3 13s-2.333 26 3 48"/></g></svg></g>
</g>
</svg>
:root {
--animation-duration: 1s;
--frame-count: 6; }
body {
margin: 0;
padding: 0; }
@keyframes ranger-talking {
0% { visibility: visible; }
16.67% { visibility: hidden; }
100% { visibility: hidden; }
}
[class*="frame"] {
visibility: hidden;
animation: ranger-talking var(--animation-duration) infinite;
}
.frame-1 { animation-delay: calc(var(--animation-duration) * 0 / var(--frame-count)); }
.frame-2 { animation-delay: calc(var(--animation-duration) * 1 / var(--frame-count)); }
.frame-3 { animation-delay: calc(var(--animation-duration) * 2 / var(--frame-count)); }
.frame-4 { animation-delay: calc(var(--animation-duration) * 3 / var(--frame-count)); }
.frame-5 { animation-delay: calc(var(--animation-duration) * 4 / var(--frame-count)); }
.frame-6 { animation-delay: calc(var(--animation-duration) * 5 / var(--frame-count)); }
// FCK NZS
Also see: Tab Triggers