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.
<!--[if gte IE 9]><!-->
<p><!-- Inline SVG --></p>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" x="0px" y="0px" width="342.065px" height="61.707px" viewBox="0 0 342.065 61.707" enable-background="new 0 0 342.065 61.707" xml:space="preserve" class="svg_logo">
<g class="svg_logo_type">
<path d="M118.694 36.813v4.942c0 5.953-2.977 9.354-8.716 9.354c-5.74 0-8.717-3.401-8.717-9.354V22.41 c0-5.952 2.977-9.354 8.717-9.354c5.739 0 8.716 3.401 8.716 9.354v3.614h-5.527v-3.986c0-2.657-1.169-3.667-3.029-3.667 s-3.029 1.01-3.029 3.667v20.089c0 2.657 1.169 3.614 3.029 3.614s3.029-0.957 3.029-3.614v-5.314H118.694z"/>
<path d="M121.775 22.41c0-5.952 3.136-9.354 8.876-9.354c5.739 0 8.875 3.401 8.875 9.354v19.345 c0 5.953-3.136 9.354-8.875 9.354c-5.74 0-8.876-3.401-8.876-9.354V22.41z M127.622 42.127c0 2.657 1.169 3.667 3.029 3.667 s3.029-1.01 3.029-3.667V22.038c0-2.657-1.169-3.667-3.029-3.667s-3.029 1.01-3.029 3.667V42.127z"/>
<path d="M155.682 39.895l3.986-26.414h8.131v37.203h-5.527v-26.68l-4.039 26.68h-5.526l-4.358-26.308v26.308h-5.102 V13.481h8.131L155.682 39.895z"/>
<path d="M189.376 22.675v4.836c0 5.952-2.869 9.194-8.716 9.194h-2.764v13.978h-5.846V13.481h8.609 C186.507 13.481 189.376 16.723 189.376 22.675z M177.897 18.796v12.596h2.764c1.86 0 2.87-0.851 2.87-3.508v-5.581 c0-2.657-1.01-3.507-2.87-3.507H177.897z"/>
<path d="M210.317 50.684h-5.899l-1.01-6.75h-7.175l-1.01 6.75h-5.367l5.952-37.203h8.557L210.317 50.684z M196.977 38.885h5.634l-2.816-18.813L196.977 38.885z"/>
<path d="M218.236 23.738v26.946h-5.262V13.481h7.335l6.005 22.268V13.481h5.209v37.203h-6.006L218.236 23.738z"/>
<path d="M241.194 38.354l-7.387-24.873h6.111l4.465 16.954l4.464-16.954h5.58l-7.387 24.873v12.331h-5.847V38.354z"/>
<path d="M265.003 13.481h5.846v31.888h9.62v5.315h-15.466V13.481z"/>
<path d="M282.542 22.41c0-5.952 3.136-9.354 8.876-9.354c5.739 0 8.875 3.401 8.875 9.354v19.345 c0 5.953-3.136 9.354-8.875 9.354c-5.74 0-8.876-3.401-8.876-9.354V22.41z M288.387 42.127c0 2.657 1.17 3.667 3.03 3.667 c1.859 0 3.029-1.01 3.029-3.667V22.038c0-2.657-1.17-3.667-3.029-3.667c-1.86 0-3.03 1.01-3.03 3.667V42.127z"/>
<path d="M312.834 29.957h8.185v11.798c0 5.953-2.976 9.354-8.716 9.354c-5.739 0-8.716-3.401-8.716-9.354V22.41 c0-5.952 2.977-9.354 8.716-9.354c5.74 0 8.716 3.401 8.716 9.354v3.614h-5.526v-3.986c0-2.657-1.17-3.667-3.029-3.667 c-1.86 0-3.03 1.01-3.03 3.667v20.089c0 2.657 1.17 3.614 3.03 3.614c1.859 0 3.029-0.957 3.029-3.614v-6.855h-2.658V29.957z"/>
<path d="M324.314 22.41c0-5.952 3.136-9.354 8.876-9.354c5.739 0 8.875 3.401 8.875 9.354v19.345 c0 5.953-3.136 9.354-8.875 9.354c-5.74 0-8.876-3.401-8.876-9.354V22.41z M330.16 42.127c0 2.657 1.17 3.667 3.03 3.667 c1.859 0 3.029-1.01 3.029-3.667V22.038c0-2.657-1.17-3.667-3.029-3.667c-1.86 0-3.03 1.01-3.03 3.667V42.127z"/>
</g>
<polygon points="78.094,58.769 38.689,61.707 0,45.658 39.406,42.721" class="svg_logo_shadow"/>
<rect x="32.986" y="4.083" transform="matrix(0.9792 -0.2029 0.2029 0.9792 -4.898 11.9324)" width="45.519" height="51.542" class="svg_logo_mark"/>
</svg>
<!--<![endif]-->
<!--[if lte IE 8]>
<p><!-- PNG Fallback --></p>
<img src="http://j.eremy.net/UhUR54uwL7FLAR/wp-content/uploads/2013/09/svg_logo.png" class="png_logo">
<![endif]-->
$app-bg-color: #f8ca00
$logo-width: 20.121em
$logo-height: 3.630em
body
padding: 1em 2em
background-color: $app-bg-color
font-family: sans-serif
font-size: 1.063em
color: #111
.svg_logo
width: $logo-width
height: $logo-height
.svg_logo_mark, .svg_logo_type
fill: #111
.svg_logo_shadow
opacity: 0.12
.png_logo
width: $logo-width
height: auto
Also see: Tab Triggers