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>
<div class="container">
<h1 class="center">Kidnapping The Princess</h1>
<article class="episode">
<div class="episode__number">00</div>
<div class="episode__content">
<div class="title">Prologue</div>
<div class="story">
<p>Say hello to the perfection of Cybele- tall, gorgeous, millionaire. She’s a supermodel by day and a kidnapper extraordinaire at night. When she took Princess Talia from the castle one night, the whole country was sent into chaos.</p>
<p>Princess Talia was the only successor to the throne, and her absence baffled the kingdom. Nobody knew that Cybele was the culprit, and no one would be able to guess her reason for it. Only she knew.</p>
<p>Watch Cybele, both our hero and villain for the story as she struggles to fulfill her wishes while trying to keep her feelings for the Princess in check.</p>
</div>
</div>
</article>
<article class="episode">
<div class="episode__number">01</div>
<div class="episode__content">
<div class="title">Episode 1</div>
<div class="story">
<p>"Let go of me you mongrel!"</p>
<p>I watched in fascination as the princess struggled against the ropes binding her ankles and wrist. She shook on the floor like a worm, her head twitching in different directions once in a while, no doubt searching for her captor, even whilst it was covered with a black cotton pillowcase.</p>
<p>"Unhand me buffoon and I'll tell my mother the queen to spare your life," she said indignantly.</p>
<p>Oooh! How lovely. As if her mother the queen could help her right now. This one was charming. It almost made me want to let go of her. Ha ha! As if. All that planning to infiltrate the castle and kidnap her would not go to waste. But while she was in my possession, I might as well have a little fun with her.</p>
<p>"I doubt your highness will spare my life if I let you go," I said to her. She stopped squirming in an instant. "You're a girl?" she asked with bathed breath. The corner of my mouth perked up into a smirk. "Last time I checked yes," I told her.</p>
<p>"What do you want from me? Do you want money? Power? Men? I can give you all of that." She tried to sit but it was too much of an effort, considering she was bound like that. I stifled a smile. "I have money," I said. "Lots of it in fact. Power comes with money, so that is not an issue. As for men. Well let's just say that I like women more."</p>
<p>"Then what do you want?" she asked in a small voice. I walked steadily to her and kneeled on the floor. Once I did, I brought her to a sitting position and leaned to her head so I could whisper. "I want your body."</p>
</div>
</div>
</article>
<article class="episode">
<div class="episode__number">02</div>
<div class="episode__content">
<div class="title">Episode 2</div>
<div class="story">
<p>She froze in an instant and squirmed away from me. "You're a lunatic! Jerk! You're an ugly son of a-" I removed the cover on her head and watched her mouth slack open as she blinked in a confused daze at me. I heard her breath hitch as she took a good look at my face. We studied each other for a while.</p>
<p>Her gray eyes took in my features. She licked her thin lips nervously and asked, "What color are your eyes. They are the strangest green."</p>
<p>I smirked at her. "They're called forest green princess." Before she could ask another question, I took her in my arms and hauled her to the bedroom. It was not without difficulty of course. She kept wriggling against me and even threatened to bite me. What a charming princess, I thought in disdain.</p>
<p>Once we were inside the bedroom, which would be her holding room or her cell if you want to call it that, I set her down on the bed where she squirmed some more. I looked her in the eyes. "If you want me to untie you, you'll stop twitching like that. You look like a maggot."</p>
<p>"I am not!" she said heatedly. I clicked my tongue at her. "Sure you're not princess."</p>
<p>She stared daggers at me. "Why did you kidnap me? You're a low life! You're the lowest!" she seethed. I gave her a patronizing look. "And you're a saint princess?" I asked with a smile. "Don't ask questions that you'll regret knowing the answer to."</p>
<p>"Are you going to kill me?" she choked. </p>
<p>"If I wanted to, I would have done it a long time ago. So to answer your question, no I'm not going to kill you. But I am going to hold you here for a long time. Look around you princess. Stare at the four corners of this room because you'll get to memorize it while you're here."</p>
<p>I pointed to the windows. "Those are barred. Even if you cut that lovely honey colored hair of yours to make a Rapunzel-like rope, you'll never escape from here." I tilted my chin to the door where she followed with her gaze. "That is made with metal and is locked with a security code that only I know of."</p>
</div>
</div>
</article>
<article class="episode">
<div class="episode__number">03</div>
<div class="episode__content">
<div class="title">Episode 3</div>
<div class="story">
<p>"Scream all you want," I continued. "This hideout is located miles from any town or road. No one will ever hear you. In this little world of ours, I'm your only friend. I will feed you, talk to you when I want to, and do things that need be. If you're not nice to me, you'll never see the daylight again. Do you understand?"</p>
<p>"I despise you," she said savagely. </p>
<p>"Well I'm very sorry to hear that," I said with a shrug. "But your attitude will not help you at all princess." I stood up and walked to the door. </p>
<p>"Wait!" she called out. "Aren't you going to remove my restraints?" </p>
<p>Her question made me smile to myself. "Say please," I said. Her jaw clenched. "Are you freaking kidding me?" she said loudly. </p>
<p>"I don't think her highness would appreciate your smart mouth princess." I faced her and grinned widely. "I'll only remove that if you say please." She closed her eyes for an instant and deliberated whether to say it or not. She thought better of it and said, "Please remove it."</p>
<p>I walked back to her and leaned down so I could untie the ropes. "See? I know there's some manners left in you," I teased. She pursed her lips and didn't reply. I knew she was angry at me for kidnapping her and doing this. But who cares? I had my own reasons. </p>
<p>My hands deftly removed the knots on the rope. Once she was untied, the princess moved her hands around and sat on the edge of the bed. She stunned me by elbowing my stomach and running to the direction of the door. Years of judo training kicked in. I pounced on her and pinned her to the ground where I straddled her.</p>
<p>"You shouldn't have done that," I told her. "My stomach is going to bruise. You're lucky that I don't have a photo shoot right now." She writhed against my grip. "What are you saying? Let me go this instant!"</p>
<p>"I'm warning you princess. If you do that again, I'll rip your clothes off and let you stay here completely naked." That made her stop. "When I release you, you're going to walk back to the bed. Understand?" She nodded. I stood up and helped her to her feet. She headed to the direction of the bed and sat down as instructed. </p>
</div>
</div>
</article>
</div>
<h3 class="center"><a href="https://www.instagram.com/aristidebenoist/" target="_blank" rel="noopener noreferer">Inspired by Aristide Benoist</a></h3>
</body>
*,
*::before,
*::after {
box-sizing: border-box;
}
body {
background: #444;
color: #fff;
font-family: 'Poppins', sans-serif;
margin: 0;
}
p {
margin: 0 0 13px 0;
}
a {
color: #fff;
}
.center { text-align: center; }
.container {
width: 95%;
max-width: 1220px;
margin: 0 auto;
}
.episode {
display: grid;
grid-template-columns: 1fr 3fr;
position: relative;
}
.episode__number {
font-size: 10vw;
font-weight: 600;
padding: 10px 0;
position: sticky;
top: 0;
text-align: center;
height: calc(10vw + 20px);
transition: all 0.2s ease-in;
}
.episode__content {
border-top: 2px solid #fff;
display: grid;
grid-template-columns: 1fr 4fr;
grid-gap: 10px;
padding: 15px 0;
}
.episode__content .title {
font-weight: 600
}
.episode__content .story {
line-height: 26px;
}
@media (max-width: 600px) {
.episode__content {
grid-template-columns: 1fr;
}
}
@media (max-width: 576px) {
.episode__content .story {
font-size: 15px;
}
}
// Mingalarpar (=
Also see: Tab Triggers