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.
<body>
<!-- https://myktongco.netlify.app -->
<section class="lorem">
<h1>Pay attention to the purple scrollbar, convallis id aliquam ultricies look! ↠</h1>
<p>
Suspendisse nec nisi quam. Quisque laoreet vel elit et tristique. Quisque rutrum ultricies condimentum. Aenean leo leo, convallis id aliquam non, eleifend quis sem. Suspendisse a nisl eget mi suscipit tincidunt. Pellentesque at mollis leo. Sed luctus mauris urna, a tempor leo vulputate at. Mauris feugiat, ipsum sit amet euismod pretium, velit nulla rhoncus mauris, at accumsan nisi lorem sed massa. Sed auctor ipsum nec sollicitudin sollicitudin. Nunc ut ipsum non justo consectetur aliquam vel ut augue. Sed aliquet, urna id venenatis tincidunt, orci nisi pulvinar nisi, id ornare massa dui non erat. Nunc dignissim nisi sed orci congue, id bibendum neque auctor. Mauris porta euismod ultricies.
</p>
<p>
Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Vestibulum faucibus nisl nunc. Nulla vitae arcu id elit pretium finibus. Mauris quis ligula vitae nulla maximus sagittis. Pellentesque sapien est, consequat eget sollicitudin id, efficitur non ipsum. Praesent diam risus, pretium vitae aliquet iaculis, dictum eu ligula. Cras at risus in eros viverra volutpat. Etiam scelerisque, arcu ut faucibus volutpat, libero mi imperdiet mauris, a tempor erat nibh a justo. Donec id odio fermentum, dictum tortor et, commodo neque. Duis neque justo, placerat vel leo sed, mollis efficitur lacus. Nullam mollis, orci in eleifend convallis, eros ex lacinia neque, in hendrerit enim tellus eget turpis. Nam lacinia turpis massa, quis maximus risus egestas quis.
</p>
<p>
Pellentesque ut feugiat arcu, ut iaculis lacus. Aenean pharetra neque diam, ut eleifend nibh cursus sit amet. Nullam viverra diam vel magna congue, nec maximus sem tempor. Etiam pharetra maximus accumsan. Nulla congue, felis vitae sagittis scelerisque, orci lorem euismod nisl, eu dapibus orci mauris nec arcu. Fusce feugiat nulla ac elit placerat luctus. Proin ut metus at mauris lobortis eleifend et eget dui. Praesent ac erat vitae erat mollis mattis. In hac habitasse platea dictumst. Ut dolor erat, facilisis a dolor non, aliquet dapibus dui. Integer porta efficitur lectus non placerat. Ut ullamcorper eget diam vel tincidunt. Integer malesuada, odio at malesuada laoreet, sapien urna placerat libero, et rhoncus turpis ex sed dolor.
</p>
<p>
Integer iaculis quam ut massa fringilla ultricies. Sed ut massa ac magna feugiat finibus vel sed turpis. Maecenas mollis felis tortor, nec porta neque sodales maximus. In hac habitasse platea dictumst. Praesent quis ipsum non neque placerat porta et eget justo. Donec tempor id mauris a malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in commodo tellus. Cras ut lacus eget nunc elementum aliquam tristique in odio. Morbi euismod arcu at vestibulum lacinia. Suspendisse aliquet justo vitae venenatis cursus. Aenean purus est, condimentum et blandit eget, fringilla in eros. Aenean est augue, auctor elementum massa et, tincidunt egestas ante. Nam luctus augue vel maximus rhoncus.
</p>
<p>
Mauris ultrices vel augue ut efficitur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi fringilla tortor id tellus luctus venenatis. Aliquam fringilla mauris nec est luctus iaculis. Quisque rhoncus in tellus a fermentum. Donec in lacus at lectus faucibus placerat sit amet vitae odio. Cras erat dolor, commodo in diam eget, vehicula sagittis nibh. Integer mi dolor, tristique sed ligula a, dictum placerat est. Suspendisse ac enim varius arcu tristique aliquam non vehicula lorem. Nullam id dignissim turpis, et sagittis sem.
</p>
<p>
Integer iaculis quam ut massa fringilla ultricies. Sed ut massa ac magna feugiat finibus vel sed turpis. Maecenas mollis felis tortor, nec porta neque sodales maximus. In hac habitasse platea dictumst. Praesent quis ipsum non neque placerat porta et eget justo. Donec tempor id mauris a malesuada. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus in commodo tellus. Cras ut lacus eget nunc elementum aliquam tristique in odio. Morbi euismod arcu at vestibulum lacinia. Suspendisse aliquet justo vitae venenatis cursus. Aenean purus est, condimentum et blandit eget, fringilla in eros. Aenean est augue, auctor elementum massa et, tincidunt egestas ante. Nam luctus augue vel maximus rhoncus.
</p>
<p>
Mauris ultrices vel augue ut efficitur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi fringilla tortor id tellus luctus venenatis. Aliquam fringilla mauris nec est luctus iaculis. Quisque rhoncus in tellus a fermentum. Donec in lacus at lectus faucibus placerat sit amet vitae odio. Cras erat dolor, commodo in diam eget, vehicula sagittis nibh. Integer mi dolor, tristique sed ligula a, dictum placerat est. Suspendisse ac enim varius arcu tristique aliquam non vehicula lorem. Nullam id dignissim turpis, et sagittis sem.
</p>
<p>
Suspendisse nec nisi quam. Quisque laoreet vel elit et tristique. Quisque rutrum ultricies condimentum. Aenean leo leo, convallis id aliquam non, eleifend quis sem. Suspendisse a nisl eget mi suscipit tincidunt. Pellentesque at mollis leo. Sed luctus mauris urna, a tempor leo vulputate at. Mauris feugiat, ipsum sit amet euismod pretium, velit nulla rhoncus mauris, at accumsan nisi lorem sed massa. Sed auctor ipsum nec sollicitudin sollicitudin. Nunc ut ipsum non justo consectetur aliquam vel ut augue. Sed aliquet, urna id venenatis tincidunt, orci nisi pulvinar nisi, id ornare massa dui non erat. Nunc dignissim nisi sed orci congue, id bibendum neque auctor. Mauris porta euismod ultricies. Mauris eu tristique sapien.
</p>
</section>
</body>
*, *::before, *::after {
box-sizing:border-box;
}
body {
position:relative;
padding:0 2.5em 2em;
line-height:1.85;
font-size:2.525vmax;
margin:0 2em;
background-color: #9E9E9E;
color: rgba(0, 0, 0, 0.5);
font-family:"Palatino Linotype", "Book Antiqua", Palatino, serif;
font-style:italic;
&::-webkit-scrollbar {
width: 1em;
z-index: 100;
background-color:#9E9E9E;
}
&::-webkit-scrollbar-thumb {
background-color:rebeccapurple;
border-width: 2px 0 2px;
border-style: solid;
border-color: #3d1d5b;
box-shadow:0 -100vh 0 100vh #00ffac;//magic
}
}//body
h1 {
line-height:1.75;
font-size:1.75em;
}
Also see: Tab Triggers