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.
<article class="container">
<h1>Important Title</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed fermentum nibh massa, sed finibus diam tincidunt et. Vivamus vel luctus nibh. Donec malesuada varius semper. Nam finibus pretium neque sit amet viverra. Nulla ut justo risus. Curabitur vulputate, velit id vehicula consequat, lorem tortor vehicula elit, sit amet blandit magna sem et elit. Duis iaculis consectetur velit ut efficitur. Nunc non mollis lectus. In suscipit dolor orci, eu commodo dui suscipit nec. Sed non nisi dignissim, fermentum ipsum eu, iaculis felis. Vivamus vestibulum urna nec interdum fermentum.</p>
<p>Aliquam varius tortor non ipsum lacinia, eget luctus eros euismod. Etiam pretium nunc id ligula aliquet, a mattis tellus facilisis. Phasellus vitae dolor a tortor dictum accumsan ut congue lorem. Donec efficitur metus non lorem viverra posuere. Suspendisse venenatis non ligula ut iaculis. Aliquam eu luctus nisi, vitae ultrices ipsum. Nam sed lacus consequat, pulvinar ex vel, congue quam. Donec ultricies bibendum ipsum sed euismod. Ut ac purus sodales, suscipit nisl ut, sagittis sapien.</p>
<p>Sed imperdiet nisi vitae risus lacinia, dignissim sollicitudin tellus scelerisque. Phasellus congue a velit at varius. Quisque faucibus rutrum ex, ut porta tellus rhoncus vitae. In id volutpat nunc. Nulla non sapien a metus mattis placerat vitae in elit. Aliquam imperdiet finibus neque, vitae aliquam metus rhoncus vitae. Praesent et luctus dolor, non consequat justo. Sed pellentesque nibh id fermentum cursus. Duis fermentum tempus euismod. Proin mollis ex et imperdiet placerat.</p>
<p>Curabitur vel lectus eget turpis dapibus fringilla in ac lectus. Sed semper enim et rhoncus auctor. Nullam posuere bibendum nisl a porttitor. Donec convallis viverra est vel efficitur. Cras quis nunc dolor. Fusce quis congue augue. Pellentesque est nisl, pretium quis tellus eget, ullamcorper iaculis est. Morbi vel cursus mi. Praesent aliquet augue nec ante auctor, eget tincidunt felis cursus. Donec venenatis felis in euismod eleifend. Nam tristique gravida justo ac condimentum. Curabitur id orci et mi convallis sollicitudin vitae vel nibh. Cras imperdiet nec neque id posuere. Nullam leo est, hendrerit aliquam ullamcorper ac, hendrerit et augue. Praesent mollis eleifend ante at ullamcorper.</p>
<p>Proin lacinia leo sed purus dictum, in finibus ante commodo. Nulla sed leo in urna mollis blandit. Pellentesque elementum ornare tempus. Vivamus varius dui erat, faucibus laoreet quam porta ac. Aliquam viverra, ipsum vel faucibus eleifend, justo erat cursus quam, venenatis sollicitudin est nibh sed purus. Integer nisi neque, consectetur eu mi vitae, egestas faucibus lectus. Proin placerat ex ut hendrerit pretium. Cras vitae ultrices ipsum, vel ultricies mauris. Nulla sed rutrum quam. Maecenas interdum consequat purus quis dapibus. Duis sit amet laoreet purus. Aliquam hendrerit posuere sapien, quis tempor lectus vestibulum at. Sed augue dui, vestibulum porttitor massa et, blandit blandit nisl. Aliquam erat volutpat. Integer consequat massa tortor, congue tincidunt mauris tincidunt a.</p>
<p>Etiam mi ligula, facilisis sed mattis vitae, tincidunt sed enim. Quisque ullamcorper pellentesque metus id maximus. Etiam fringilla urna magna, facilisis convallis lacus commodo vehicula. Mauris vel mi vel arcu cursus fermentum quis in dui. Etiam ultrices libero nibh, at posuere ex varius non. Donec eget metus augue. Donec non finibus libero. Fusce eu imperdiet nulla.</p>
<p>Suspendisse aliquet porta suscipit. Donec sit amet sapien nisl. Nullam porta est sit amet urna gravida viverra. Sed eu nunc tortor. Phasellus sagittis, neque at interdum efficitur, metus erat pretium est, at rhoncus est tortor sed ligula. Donec ornare sed urna ac ornare. Donec eget sollicitudin ex. Sed ante metus, posuere faucibus facilisis et, lobortis at ex.</p>
<p>Aliquam lacinia dignissim hendrerit. Phasellus consectetur ornare diam in dignissim. Praesent et aliquet orci, non lacinia sapien. Pellentesque vulputate, odio in laoreet bibendum, odio massa mattis eros, vel aliquam metus ex sed sem. In at enim nisl. Cras diam ante, porttitor vel justo sit amet, iaculis scelerisque velit. In rhoncus neque tincidunt blandit imperdiet. Nulla tristique orci eget elit volutpat fermentum. Donec ut interdum ante. Aliquam leo quam, commodo nec mauris in, tincidunt malesuada dolor. Fusce nec varius dolor. Ut non lacus eros. Fusce vel lacus vestibulum odio aliquam eleifend. Nam eu auctor urna, a consectetur metus. Vivamus neque neque, tristique vel arcu a, dignissim maximus odio.</p>
<p>Nullam viverra aliquet mi non sagittis. Sed sit amet leo eu tortor euismod cursus. Etiam nec velit non neque tempus porttitor sed ac mauris. Duis ultricies eu est id congue. Nam lobortis posuere augue, vel sagittis erat fermentum nec. Nulla hendrerit aliquet eleifend. Vivamus dignissim blandit neque vitae ornare. Vivamus sit amet leo nec eros commodo rutrum at id enim. Nunc dictum, purus ut pretium eleifend, magna nunc consequat odio, at interdum odio libero et mauris. In sagittis lorem vitae scelerisque ultrices. Curabitur mattis, massa id tempus bibendum, nisi nisl vehicula orci, tincidunt malesuada diam libero vitae ligula. Nam a justo vehicula, feugiat mi et, venenatis nunc. Nulla iaculis urna vitae lorem maximus aliquet. Sed non ex eu metus convallis interdum eget non ligula. Nullam vulputate massa neque, ut gravida lacus eleifend vitae. Sed bibendum fermentum sagittis.</p>
<p>Ut euismod arcu nibh, eget laoreet sem blandit et. Donec gravida ultricies massa, quis congue ex facilisis eu. Praesent eu felis nisl. Pellentesque id pellentesque risus, tincidunt vulputate lorem. Phasellus tempor urna eu arcu bibendum scelerisque. Integer sed massa lorem. Aenean ultrices tempus elit vel viverra. Proin et libero eu purus tempus tempus quis sed eros. Sed ac consequat purus. Duis gravida rutrum elit id luctus. Maecenas ullamcorper, dolor a molestie euismod, eros est maximus magna, rutrum interdum nulla nisi ut orci.</p>
<p>Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; In a felis ornare, tempor sapien vel, sodales nisi. Nulla suscipit arcu urna, id ultrices lorem aliquet nec. Aliquam vel tempus risus. Nunc nec risus eu purus dapibus laoreet. Aliquam at pretium nibh, id commodo arcu. Nunc at eros eget odio fermentum commodo. Nulla facilisi. Aenean in purus eleifend, gravida leo id, euismod nulla. Proin vestibulum placerat ultrices. Pellentesque sit amet porta neque. Aliquam augue ante, viverra vel felis vitae, eleifend varius lectus. Phasellus scelerisque turpis at risus dignissim, auctor mollis est tristique. Vestibulum id aliquet diam.</p>
<p>Cras vel enim felis. Suspendisse ante est, egestas et lorem vel, pulvinar dapibus quam. Proin facilisis consectetur mi non convallis. Nam tincidunt commodo tortor sit amet laoreet. Donec vel dolor molestie, convallis lacus quis, interdum tellus. Donec vel nisi vitae elit consectetur dapibus eu ut enim. Suspendisse potenti. Aliquam erat volutpat. Donec arcu lacus, volutpat quis lectus eget, consequat auctor neque.</p>
<p>Sed eu quam accumsan, accumsan quam vel, ullamcorper dui. Duis bibendum fringilla convallis. Maecenas porttitor interdum ante vel euismod. Mauris efficitur dolor et neque luctus, sed egestas nibh varius. Sed egestas lorem eget lacinia laoreet. Integer condimentum nisi et ullamcorper tempus. Donec varius mi interdum nibh vehicula, vel ultrices eros auctor. In lacinia mollis mollis. Quisque dignissim turpis quis lacinia sollicitudin. Pellentesque semper sollicitudin libero eleifend venenatis.</p>
<p>Sed eget felis vel nibh ultricies commodo. Nulla facilisi. Integer at augue in odio consequat malesuada quis eu dui. Morbi tristique, arcu vel sodales vestibulum, eros urna porta nibh, at lobortis eros purus eget urna. Ut porttitor faucibus fringilla. Quisque non lobortis eros. Duis commodo massa erat, in pharetra lacus pulvinar sit amet. Donec quis ullamcorper quam, vel iaculis arcu. Quisque laoreet gravida quam, et semper enim facilisis tincidunt. Ut pulvinar odio ac purus molestie mollis eget id libero. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas a malesuada nisi. Aliquam sagittis turpis vel dignissim euismod. Suspendisse fringilla augue ac justo placerat, ut pellentesque tortor cursus. Aliquam vel eleifend justo. Vivamus molestie ultrices lectus, a suscipit nunc finibus sed.</p>
<p>Pellentesque et cursus metus, a auctor mi. Nam faucibus leo sed massa interdum sollicitudin. Mauris convallis vulputate arcu, a mattis leo commodo id. Sed lectus nunc, posuere ac orci eget, tempus accumsan dui. Sed risus risus, laoreet eget elit in, mollis laoreet leo. Nullam luctus tempor consequat. Phasellus et arcu a arcu eleifend tincidunt et eu metus. Maecenas ullamcorper, lacus sit amet commodo ultrices, nisi lectus porta dui, quis iaculis massa lorem sed libero. Integer neque nibh, dignissim quis viverra eget, convallis vitae sem. Nulla sagittis urna sit amet dui ultrices egestas. Praesent vulputate elit id leo egestas, vitae euismod dolor feugiat. Donec non nulla a quam rhoncus faucibus. Maecenas euismod viverra gravida. Ut tincidunt justo id luctus pharetra. </p>
</article>
.container {
margin: 0 25px;
text-align: justify;
column-count: 2;
column-gap: 2.5em;
column-rule-color: #bada55;
column-rule-style: groove;
column-rule-width: 8px;
}
.container h1 {
column-span: all;
background: lightsteelblue;
text-align: center;
padding: 10px;
}
.container p {
margin: 0 0 1.5em;
}
Also see: Tab Triggers