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>
Lorem ipsum odor amet, consectetuer adipiscing elit. Donec purus nunc himenaeos mattis sed, aptent tellus pellentesque. Blandit purus dolor nunc non proin facilisi. Faucibus fames quam nibh orci malesuada himenaeos. Platea urna cursus nisi, eros pretium dapibus. Fringilla risus himenaeos lobortis pulvinar platea quis maximus ultricies. Iaculis in lorem dolor dictum finibus. Eros id sapien adipiscing; urna sit amet mauris. Leo efficitur risus dapibus; pellentesque hac bibendum non.
Nascetur maximus massa hac; molestie lacus elit turpis. Inceptos laoreet eros volutpat imperdiet suspendisse. Feugiat vel phasellus elit facilisi porta. Mus commodo rutrum pulvinar dui himenaeos ornare elit. Phasellus sollicitudin interdum enim volutpat tristique. Id laoreet faucibus taciti magnis libero. Felis ullamcorper faucibus habitasse maximus cubilia fermentum facilisi. Ut risus accumsan nibh mus; sagittis risus justo felis molestie.
Morbi conubia magna a laoreet fringilla turpis euismod. Maximus nostra platea tristique, nec habitant cursus aliquam eleifend. Nostra class laoreet interdum in; tortor nascetur mauris sociosqu. Ridiculus accumsan faucibus ligula accumsan habitant commodo sem aliquet. Phasellus tortor senectus class; tempus magnis vehicula. Molestie malesuada aliquam potenti; metus sodales conubia integer ipsum. Sed quis erat nullam ridiculus eu egestas cras.
Rhoncus dui tristique nam penatibus phasellus tellus primis fames euismod. Euismod at bibendum maximus nulla ex. Aliquam class duis consequat inceptos mollis vestibulum pulvinar dictum. Venenatis interdum rhoncus risus purus vestibulum cubilia. Egestas integer mattis volutpat mattis sapien lobortis efficitur. Orci himenaeos efficitur platea sed curae vel cras ultrices. Auctor ad turpis interdum lacinia blandit viverra himenaeos libero. Gravida orci aptent blandit primis urna augue.
Ex molestie dui dapibus felis habitasse vestibulum. Taciti iaculis eleifend aliquam; laoreet eros pharetra eleifend mi cras. Lacus molestie cubilia risus dapibus ullamcorper semper sapien arcu. Risus imperdiet platea viverra pretium in convallis metus morbi. Mus nascetur volutpat vivamus rhoncus vitae dignissim. Duis sem mauris vehicula; vulputate praesent habitasse. Eu porttitor lectus lectus diam bibendum felis potenti quam. Semper dapibus tellus nulla orci eget pretium litora.
Urna vel tristique amet odio maecenas posuere leo. Nullam habitasse dolor tellus lorem sed ligula suspendisse massa. Mus neque tellus aptent donec lectus. Platea amet sollicitudin platea sollicitudin at. Maximus justo morbi vivamus; ullamcorper aptent netus ornare facilisi. Vivamus penatibus consectetur augue phasellus aliquet euismod condimentum sagittis vitae. Pretium maximus elementum commodo facilisi convallis dolor.
Ad sem adipiscing magnis fermentum iaculis placerat sollicitudin finibus a. Porttitor purus curae lacus at primis sociosqu etiam egestas. Lectus interdum ornare ornare senectus ut mattis sit semper. Efficitur ac dapibus ultricies; consequat lorem molestie orci. Facilisis mi non fringilla semper auctor habitasse nec. Nullam metus et ultrices aenean dignissim. Fringilla dictum ultricies lacinia magnis pellentesque adipiscing finibus a dignissim. Habitant ornare blandit mattis magna molestie ligula mus hac. Sed et pharetra mattis dui, hac arcu dignissim morbi.
Facilisis sapien pellentesque justo id diam lorem euismod platea. Elit neque viverra magna litora placerat efficitur vivamus ligula. Augue enim nibh cursus iaculis mauris metus nascetur hac. Vestibulum venenatis porttitor accumsan; faucibus leo efficitur. Etiam taciti morbi suscipit ad nec aenean. Tempus facilisis dictum urna tincidunt sodales diam. Dapibus eu sollicitudin cubilia rhoncus netus eleifend primis lobortis.
Velit et fermentum vivamus tincidunt scelerisque lectus elementum cras. Placerat eget molestie; non ac potenti facilisi. Vitae consequat eleifend pharetra elit velit auctor praesent. Fringilla habitant interdum vehicula non arcu condimentum. Tortor tempor rhoncus pretium luctus blandit tristique. Aliquam gravida sollicitudin porttitor fringilla fames. Nec luctus est condimentum habitant; justo ut. In a adipiscing cras id duis. Sagittis consectetur maecenas dui nec euismod.
Sodales tincidunt eget mus nunc elementum molestie mollis. Eu nisl eget eget metus etiam egestas tortor! Mollis maximus tortor placerat ad habitant. Id nibh porta blandit, erat maecenas quam. Sapien finibus nam velit aptent; adipiscing consectetur. Consequat maximus ornare felis sed per venenatis primis proin.
Maecenas lacus ut vitae iaculis; mauris justo orci. Nisl consequat convallis lectus urna adipiscing purus ac bibendum. Faucibus erat dolor porttitor commodo eros primis magnis mollis facilisi. Etiam faucibus sed quisque fringilla gravida suspendisse. Aliquam montes viverra; nam donec lectus cursus nisl odio dictum? Aptent turpis eu mus hac euismod cursus facilisis scelerisque cras.
Id lacinia hendrerit lacinia facilisi penatibus. Proin scelerisque neque sociosqu iaculis sit cras justo. Porta imperdiet commodo class commodo varius curae morbi tristique vestibulum. Habitant velit quam curabitur tincidunt potenti pharetra. Imperdiet lobortis tincidunt donec sit a litora integer aliquet. Nec dictum laoreet natoque nulla ut lacus. In integer pellentesque; ultricies facilisi proin velit.
Lobortis turpis interdum purus sit odio tellus commodo tortor. Elementum at sociosqu duis luctus arcu natoque sit lobortis. Venenatis suspendisse in eros amet; eget nec taciti. Nulla nec vitae venenatis efficitur volutpat massa magnis lacinia ornare. Morbi egestas quam nibh sociosqu netus in morbi. Elementum magna pellentesque urna, nisl maximus etiam. Hendrerit lectus cras euismod donec torquent egestas aenean. Pharetra nulla varius tristique integer tellus consectetur. Ipsum leo lobortis duis gravida tempor himenaeos.
Velit rhoncus risus facilisis vel habitant. Amet sagittis augue, nascetur sapien ac ridiculus aenean pretium. Nibh platea lacinia eros cubilia porttitor senectus conubia. Laoreet nisi a natoque cubilia eleifend finibus. Dignissim sem quam quisque pretium odio blandit justo vestibulum hac. In consequat tincidunt turpis scelerisque molestie sollicitudin. Vel volutpat fringilla eu mus velit tortor. Dictumst rutrum potenti lorem consectetur arcu massa. Varius est eu turpis etiam fusce nam senectus litora proin.
Enim luctus maximus eu condimentum vulputate. Mollis vivamus sodales ultrices eget fames fringilla erat tortor. Mattis sem maecenas maecenas viverra tristique iaculis tortor ac dignissim. Convallis nisi lectus interdum orci massa. Ac facilisis lectus praesent iaculis facilisi vulputate dui commodo egestas. Sollicitudin habitant donec consequat pulvinar; accumsan habitant varius. Interdum ornare netus sapien habitasse dui. Neque dapibus luctus sed mauris ultricies montes.
At facilisi sodales potenti, ultrices erat non congue. Curae auctor libero penatibus malesuada blandit, litora efficitur. Morbi suscipit luctus elementum suspendisse scelerisque risus suscipit. Mauris mi dolor rhoncus lectus augue justo. Facilisi adipiscing lacinia mattis orci donec congue auctor montes. Sagittis sollicitudin porttitor sapien vestibulum rhoncus nisl in. Integer eros diam ante sit, torquent nascetur vel.
Ridiculus est tempus enim convallis quam, dapibus viverra. Neque sagittis sed gravida sagittis egestas convallis nisl convallis? Sodales euismod odio finibus odio eleifend orci porttitor felis. Interdum ut sit eget magnis nostra convallis. Vitae rutrum etiam euismod malesuada ut vivamus quam ultrices sem. Interdum turpis nisl morbi condimentum; himenaeos penatibus ridiculus pellentesque. Per massa ac, metus viverra sociosqu lobortis potenti.
Quisque mollis amet etiam ipsum proin iaculis interdum parturient. Lobortis luctus turpis luctus elit torquent metus semper vehicula tellus? Ipsum maximus duis per morbi, magnis facilisi nostra. Augue etiam pharetra aliquam placerat class ligula ultricies feugiat risus. Condimentum ut arcu sed justo nisl. Gravida laoreet sagittis conubia vitae eu nam. Fusce ipsum cubilia aliquet congue convallis.
Natoque enim inceptos primis metus mattis, quam nullam cubilia. Ex arcu imperdiet ut ligula sagittis penatibus. Vestibulum imperdiet pellentesque auctor pharetra primis, nam consectetur. Morbi facilisis ac cras ac per. Amet justo dui mi eget et mus elit elit. Himenaeos eleifend velit etiam et ridiculus praesent dictum enim nisl. Auctor interdum ad litora aliquet cursus suscipit. Vestibulum pellentesque tincidunt vestibulum justo aliquet.
Sapien nulla posuere tempor maximus scelerisque commodo scelerisque. Felis per ante fringilla; nisi dignissim ipsum semper. Eleifend class pretium eu nisi netus id volutpat accumsan condimentum. Penatibus nisl lorem facilisi sollicitudin curabitur netus viverra. Purus dis pulvinar nostra dictumst faucibus praesent. Neque justo sed primis malesuada vitae ultrices leo.
</div>
:root {
--primary: #007ac3;
--secondary: #d2232a;
}
body {
display: flex;
height: 90vh;
}
div {
margin: auto;
height: 60vh;
width: min(100vw, 400px);
overflow: auto;
padding: 2ch;
border-radius: 5px;
box-shadow: 0 0 2px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.24)
}
::-webkit-scrollbar {
width: 13px;
}
::-webkit-scrollbar-track {
background: linear-gradient(to bottom, var(--primary), var(--secondary));
border-radius: 10px;
}
::-webkit-scrollbar-thumb {
background-color: transparent;
border-radius: 10px;
border: 3px solid #fff;
outline: 99999px solid #fff;
}
Also see: Tab Triggers