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 URL's 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 it's URL and the proper URL extention.
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 Skypack, which makes packages from npm not only available on a CDN, but prepares them for native JavaScript ES6 import
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 class="halloween_epicode"><!--
--><div class="top"><!--
--><div class="left_bloc"><!--
--><h1>Alienor de Canterville</h1><!--
--><p><b>Métier :</b> Fantome, chevalier & féministe
<b>Hobby :</b> Effrayer les ploucs, lire l'art de la séduction (édition 1791) & tailler en pièces ses prétendants
<b>Aime :</b> Les pluies d'intestins, peindre les murs, piffer les gens, sauter d'une falaise & le schlag
<b>Déteste :</b> Se faire invoquer, les rimes à deux balles, les bébés chats & la possession</p>
</div><!--
--><div class="right_bloc"><!--
--><h2>Il n'est pas encore né l'homme qui me fera ployer </h2><!--
--><h3>Je pensais à une soirée toute simple : vous vider de votre sang, vous arracher le pancréas, une soupe & au dodo</h3><!--
--><div class="history"><!--
--><p>Aliénor de Canterville, femme chevalier, rebelle, féministe et… damnée depuis un peu plus de 252 ans. Habituée à provoquer ses prétendants en duels, jamais elle n'aurait pensée finir maudite à cause de cela. Pour la petite histoire, tout découle de son ultime duel avec un poète qui la courtisait. Sans vraiment le chercher elle le tua et ses derniers mots scellèrent le destin de notre insoumise. Rongée par son acte elle commit l'irréparable, sans se douter que ça ne suffirait pas à la libérer de son fardeau.
Depuis, elle doit subir sa damnation, ce qui fait que chaque soir avant minuit elle doit revivre les circonstances de sa mort. Un seul oubli et elle deviendra un spectre de 302 ans. Sa seule compagnie est son obligé Gwilherm. Ce qui explique sans doute qu'elle vire à tour de bras tout intrus. Bah oui on a tous ce pote qu'on ne veut présenter à personne parce qu'il va nous foutre le seum.
Sa routine était bien ficelée jusqu'à l'arrivée de cette famille. Attendez, des parisiens en Bretagne qu'elle est cette diablerie ?! Et non contents de squatter, voilà qu'ils refusent de plier bagage.
Donc si elle ne réussit pas à les envoyer paitre il va falloir qu'elle arrive à pleurer... Et même penser à un bébé chat ça n'a pas marché. Roh la galère. </p><!--
--><div class="img_alienor"></div></div><!--
--></div><!--
--></div><!--
--><div class="bot"><!--
--><h4>Maudit poète</h4><!--
--><div class="img_bot"></div><!--
-->Froide comme la mort, demeurez ainsi à jamais. Que mes derniers vers vous accompagnent désormais.
Canterville jamais ne lâcha larme. D'un seul sanglot, la damnation se désarme. A la parole donnée votre âme s'enchaine. Redoutez que le traitre ne la ramène.</div><!--
--><div class=""></div><!--
--></div><!--
@import url('https://fonts.googleapis.com/css2?family=Griffy&family=Raleway:wght@100&display=swap');
::-webkit-scrollbar {
width: 4px;
}
::-webkit-scrollbar-thumb {
background-color: #ad54cf;
}
::-webkit-scrollbar-track {
background-color: transparent;
}
.halloween_epicode{
width:650px;
height:900px;
margin: auto;
background: linear-gradient(to left, #56416c, #000);
padding: 5px 0;
box-shadow: 0 1px 6px rgba(0,0,0,0.1);
color: #f1f1f1;
font-family: 'Raleway', sans-serif;
text-align: justify;
}
.top{
height:545px;
display:flex;
margin-bottom: 14px;
}
.left_bloc{
width:190px;
border-right: 1px solid #ad54cf;
padding:0 10px;
}
.left_bloc p{
height:76%;
overflow:auto;
padding: 0 5px;
margin: -5px 0 0;
white-space:pre-wrap;
text-align:left;
}
.left_bloc b {
font: 18px 'Griffy', cursive;
color:#ad8bba;
font-weight: bold;
}
h1{
color:#ad8bba;
font: 40px 'Griffy', cursive;
text-align: center;
text-shadow: 0 0 7px #535353, 0 0 10px #535353, 0 0 21px #535353, 0 0 42px #ad54cf, 0 0 82px #ad54cf, 0 0 92px #ad54cf, 0 0 102px #ad54cf, 0 0 121px #ad54cf;
animation: pulsate 1s infinite alternate;
}
@keyframes pulsate {
100% {
text-shadow: 0 0 4px #535353, 0 0 11px #535353, 0 0 19px #535353, 0 0 40px #ad54cf, 0 0 80px #ad54cf, 0 0 90px #ad54cf, 0 0 100px #ad54cf, 0 0 120px #ad54cf;
}
0% {
text-shadow: 0 0 2px #535353, 0 0 4px #535353, 0 0 6px #535353, 0 0 10px #ad54cf, 0 0 45px #ad54cf, 0 0 55px #ad54cf, 0 0 70px #ad54cf, 0 0 80px #ad54cf;
}
}
.right_bloc{
width: 410px;
padding:0 10px;
}
h2{
font-size: 20px;
color:#ad8bba;
text-transform:uppercase;
}
h3{
font-size:13px;
font-weight: lighter;
font-style: italic;
color: #f2d8cf;
}
.history{
overflow:auto;
display:flex;
}
.history p{
width:195px;
height:400px;
overflow:auto;
padding:0 5px 0 0;display: inline-block;
}
.img_alienor{
background: url(https://zupimages.net/up/21/45/l9t9.gif);
width: 200px;
height: 400px;
outline-offset: 2px ;
outline: 1px solid #ad54cf;
margin: 18px 0 10px 7px ;
}
.bot{
margin:auto;
width:550px;
height:200px;
border-top: 1px solid #ad54cf;
font-style:italic;
}
h4{
text-transform:uppercase;
text-align:center;
color:#ad8bba;
font: 20px 'Griffy', cursive;
margin: 15px auto;
}
.img_bot{ background:url(https://zupimages.net/up/21/45/d17f.gif);
width:450px;
height:175px;
background-position:50%;
background-size:cover;
margin:-10px auto 15px;
}
Also see: Tab Triggers