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.
<!-- Everything here goes inside of your <body></body> tags! -->
<div class="container">
<div class="post-it">
<p>hello! this is a little post-it-note!</p>
<p>you can write whatever you want here!</p>
</div>
<div class="white-box">
<div class="title">Kawaii Notebook</div>
<div class="content">
<p>Here's a box with some more space, maybe for a title? Or blinkies? I think blinkies :) Lalalalala.</p>
</div>
</div>
<div class="notebook">
<div class="wrapper">
<div class="page-title">Welcome!</div>
<p>This layout is based on <a href="https://www.createblog.com/website-templates/36207-kawaii-collage/preview/URL" target="_blank">'kawaii collage' by sugarpurr</a>. I removed the background and I scaled the image up a bit with an AI tool.</p>
<p>Unfortunately, this layout is not responsive and does not look nice on phones :(</p>
<p>But it's still super cool!</p>
<p><strong>bold</strong> <em>italic</em> <u>underline</u></p>
<p class="removeThis">You can find the code to this layout <a href="https://codepen.io/sadness97/pen/poWRGmq" target="_blank">here</a>.</p>
<p>Enjoy some catsum ipsum to demonstrate the scrollbar :3</p>
<p>Catch mouse and gave it as a present kitty run to human with blood on mouth from frenzied attack on poor innocent mouse, don't i look cute? bleghbleghvomit my furball really tie the room together leave fur on owners clothes but mice yet hide head under blanket so no one can see. Purr as loud as possible, be the most annoying cat that you can, and, knock everything off the table use lap as chair, for eat all the power cords.</p>
<p>Sit on the laptop scratch so owner bleeds for snuggles up to shoulders or knees and purrs you to sleep if human is on laptop sit on the keyboard, yet lick left leg for ninety minutes, still dirty or in the middle of the night i crawl onto your chest and purr gently to help you sleep. Love to play with owner's hair tie hide from vacuum cleaner. Cat dog hate mouse eat string barf pillow no baths hate everything.
<p>Meow meow attack the dog then pretend like nothing happened chase little red dot someday it will be mine! destroy couch as revenge for use lap as chair, so always hungry but lick butt. Be a nyan cat, feel great about it, be annoying 24/7 poop rainbows in litter box all day mrow yet catching very fast laser pointer. Carrying out surveillance on the neighbour's dog. Sleeps on my head waffles, so pet me pet me don't pet me so stand with legs in litter box, but poop outside check cat door for ambush 10 times before coming in for hack up furballs, curl into a furry donut. Touch water with paw then recoil in horror. Cats are the world.</p>
</p>
</div>
</div>
<div class="yellow-note">
<div class="wrapper">
<div class="subtitle">Navigation</div>
<ul class="pixelbullets">
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
<li><a href="#">link</a></li>
</ul>
<div class="subtitle">Section</div>
<p>You can put whatever you like here! Buttons, blinkies, text, images, anything!</p>
<div class="subtitle">Section</div>
<p>Another section!? How generous!</p>
<div class="subtitle">More Catsum</div>
<p>Meow meow attack the dog then pretend like nothing happened chase little red dot someday it will be mine! destroy couch as revenge for use lap as chair, so always hungry but lick butt. Be a nyan cat, feel great about it, be annoying 24/7 poop rainbows in litter box all day mrow yet catching very fast laser pointer.</p>
<p>Carrying out surveillance on the neighbour's dog. Sleeps on my head waffles, so pet me pet me don't pet me so stand with legs in litter box, but poop outside check cat door for ambush 10 times before coming in for hack up furballs, curl into a furry donut. Touch water with paw then recoil in horror. Cats are the world.</p>
</div>
</div>
</div>
<div class="footer">This layout was lovingly re-crafted by <a href="https://sadgrl.online/" target="_blank">sadgrl.online</a></div>
</div>
/* You can either copy the below and paste it between style tags on your HTML page, OR you can copy this to a file and name it .css and link it from your HTML page. */
:root {
--accent-light: #fb90b6;
--accent-dark: #c9507a;
--accent-muted: #afafaf;
}
html,
body {
margin: 0;
font-family: "Verdana";
font-size: 10px;
background-color: pink;
background-image: url("https://sadgrl.online/images/bgs/tile/heartpinkpas.gif");
}
strong {
color: var(--accent-dark);
}
em {
color: var(--accent-light);
}
u {
color: var(--accent-dark);
}
a {
color: var(--accent-dark);
font-weight: bold;
text-decoration: none;
}
.wrapper {
padding: 20px;
}
.container {
position: relative;
content: "";
background-image: url("https://sadgrl.online/images/lyts/not-mine/notebook-collage.png");
background-repeat: no-repeat;
height: 100%;
max-width: 900px;
height: 770px;
margin: 0 auto;
}
.post-it,
.white-box,
.notebook,
.yellow-note {
position: absolute;
}
.post-it {
top: 20px;
left: 40px;
width: 130px;
}
.white-box {
top: 20px;
left: 180px;
width: 500px;
height: 100px;
overflow: hidden;
}
.notebook {
top: 172px;
left: 145px;
}
.notebook > .wrapper {
overflow: auto;
height: 450px;
width: 380px;
padding-right: 84px;
scrollbar-width: thin; /* "auto" or "thin" */
scrollbar-color: #000 #c4c4c4; /* scroll thumb and track */
}
.notebook > .wrapper p {
line-height: 16.2px;
margin-bottom: 16.5px;
}
.yellow-note {
left: 640px;
top: 160px;
width: 180px;
height: 550px;
overflow: auto;
scrollbar-width: thin; /* "auto" or "thin" */
scrollbar-color: #e8d866 #d6ca71; /* scroll thumb and track */
}
.title {
font-size: 35px;
font-weight: bold;
letter-spacing: 1px;
border-bottom: 3px dotted var(--accent-muted);
color: var(--accent-dark);
}
.content {
}
.subtitle {
font-size: 15px;
font-weight: bold;
letter-spacing: 1px;
border-bottom: 3px dotted var(--accent-muted);
margin-bottom: 10px;
color: var(--accent-dark);
}
ul.pixelbullets {
list-style-image: url("https://sadgrl.online/images/lyts/not-mine/hearth_rosa.gif");
padding-left: 25px;
}
.page-title {
font-size: 25px;
padding-bottom: 4px;
color: var(--accent-dark);
font-weight: bold;
}
.footer {
text-align:center;
}
.yellow-note::-webkit-scrollbar {
width: 12px; /* width of the entire scrollbar */
}
.yellow-note::-webkit-scrollbar-track {
background: #e8d866; /* color of the tracking area */
}
.yellow-note::-webkit-scrollbar-thumb {
background-color: #d6ca71; /* color of the scroll thumb */
}
.notebook > .wrapper::-webkit-scrollbar {
width: 12px; /* width of the entire scrollbar */
}
.notebook > .wrapper::-webkit-scrollbar-track {
background: #c4c4c4;; /* color of the tracking area */
}
.notebook > .wrapper::-webkit-scrollbar-thumb {
background-color: #000; /* color of the scroll thumb */
}
.removeThis {
background-color:yellow;
}
Also see: Tab Triggers