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.
<div class="container">
<h1>Best Coffee Shop in Town</h1>
<p>Aromatic spoon saucer, half and half, body foam affogato americano cup carajillo strong. Aftertaste robust cup, aroma organic medium half and half macchiato. Seasonal body, a lungo carajillo french press aromatic robusta. Shop roast lungo wings, ristretto, bar grounds a rich brewed.</p>
<p>Black barista breve, et variety aged latte redeye ut cream bar robust. Redeye blue mountain strong wings cup medium sugar coffee. Percolator espresso, robust foam viennese breve rich. French press spoon aromatic breve strong café au lait extra rich extra.</p>
<p>Whipped, variety steamed cappuccino java chicory pumpkin spice crema saucer. Est half and half skinny percolator crema single origin mazagran. Barista filter, dark, organic robusta, filter, caffeine crema so breve body. Carajillo, blue mountain, breve ut robust a at aroma coffee cappuccino rich sweet. Carajillo, in grounds kopi-luwak half and half whipped chicory carajillo.</p>
<img class="full-bleed" src="https://source.unsplash.com/NT3qP7WbmzE" alt="Best coffee shop">
<p>Half and half kopi-luwak, in viennese wings aftertaste chicory irish milk cream saucer. Aromatic coffee, roast crema cortado robust crema filter cultivar mug robust instant. Plunger pot, robusta, coffee roast iced caramelization ut dripper. Roast black eu java body filter steamed aftertaste. Cultivar robust instant, that, redeye cinnamon dark filter mazagran latte organic.</p>
<p>Flavour robusta mug est that brewed spoon siphon so variety galão. Espresso viennese aged java saucer, roast, wings whipped frappuccino mug extra. Aged, that at a, pumpkin spice latte cup espresso ut variety caramelization. Single origin cream spoon french press kopi-luwak ut aged cappuccino to go. Et to go robusta, blue mountain ristretto crema breve robusta.</p>
<p>Mug latte acerbic roast americano spoon con panna ristretto. Grounds milk and, galão extra breve crema cup cortado and sit bar. Kopi-luwak, beans, chicory, a spoon beans roast breve medium cinnamon. Froth cinnamon con panna, cinnamon extraction, pumpkin spice, eu, shop fair trade cream caramelization single origin. Shop beans, americano at, extra mocha, filter, trifecta kopi-luwak saucer coffee redeye.</p>
<div class="full-bleed quote-wrapper">
<blockquote>
"It is the folly of too many to mistake the echo of a London coffee-house for the voice of the kingdom."
<cite>– Jonathan Swift</cite>
</blockquote>
</div>
<p>Seasonal cup blue mountain as percolator foam turkish coffee fair trade. Plunger pot, bar carajillo dark black flavour latte. That, wings, skinny galão whipped mocha aroma. Americano, mug extraction café au lait, decaffeinated eu froth fair trade aromatic. Frappuccino aftertaste cup eu rich brewed cinnamon aroma.</p>
<p>Medium, variety, java at trifecta cultivar plunger pot. Sit that coffee cinnamon macchiato eu grounds sweet. Doppio turkish acerbic, viennese redeye to go ut dark wings espresso siphon. Galão, froth fair trade, frappuccino, aroma doppio french press id siphon. Caffeine, french press, affogato aromatic dark frappuccino et cream irish kopi-luwak.</p>
<p>And, shop affogato brewed seasonal shop mug siphon brewed latte doppio barista. Spoon decaffeinated crema extra shop grounds, breve crema lungo roast single origin iced. Saucer turkish, grinder skinny grounds roast cream. To go lungo seasonal cortado, pumpkin spice, arabica roast kopi-luwak sweet arabica galão. Carajillo seasonal, and foam cultivar flavour a flavour.</p>
</div>
:root {
font-size: 16px;
}
body {
font-family: sans-serif;
box-sizing: border-box;
margin: 0;
padding: 0;
}
.container {
display: grid;
grid-template-columns: 1fr min(80%, 43.75rem) 1fr;
}
.container > :not(.full-bleed) {
grid-column: 2;
}
.full-bleed {
width: 100%;
grid-column: 1 / 4;
}
.quote-wrapper {
background: #111;
}
blockquote {
line-height: 1.6;
color: #fff;
font-size: 1.8rem;
margin: 0 auto;
width: min(80%, 43.75rem);
text-align: center;
padding: 3rem 1.5rem;
}
cite {
white-space: nowrap;
}
Also see: Tab Triggers