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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.
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.
If the stylesheet 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 CSS 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.
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.
Private Pens are hidden everywhere on CodePen, except to you. You can still share them and other people can see them, they just can't find them through searching or browsing.
Upgrade to PROIf 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.
Templates are Pens that can be used to start other Pens quickly from the create menu. The new Pen will copy all the code and settings from the template and make a new Pen (that is not a fork). You can view all of your templates, or learn more in the documentation.
Any Pen can act as a template (even if you don't flip the toggle above) with a special URL you can use yourself or share with others. Here's this Pen's template URL:
Screenshots of Pens are shown in mobile browsers, RSS feeds, to users who chose images instead of iframes, and in social media sharing.
This Pen is using the default Screenshot, generated by CodePen. Upgrade to PRO to upload your own thumbnail that will be displayed on previews of this pen throughout the site and when sharing to social media.
Upgrade to PRO
<div class="whole">
<div>
<h1 style="color:#404040; text-align:center; padding-top:15px">Frederic Chopin</h1>
<h3 style="color:#606060; text-align:center"><em>The most famous piano composer in history</em><h3>
</div>
<div class="whitepart" style="background-color: #FFFFFF">
<div class="image">
<a href="https://www.google.com/search?safe=strict&hl=en&authuser=0&site=imghp&tbm=isch&source=hp&biw=1920&bih=950&q=chopin&oq=chopin&gs_l=img.3..0l10.864.1342.0.1449.6.6.0.0.0.0.133.563.1j4.5.0....0...1ac.1.64.img..1.5.560.ZdNyeRA6LnM" target="blank"><img class="chopin" src="https://cdn.cloudpix.co/images/frederic-chopin/frdric-chopin-ecde-wallpaper-4a63ef9ffa3d6bfe76b982dc40a7e988-large-1043559.jpg"></a>
</div>
<p style="margin-left:40px; margin-right: 40px; padding-bottom:10px"><strong>Chopin wrote music primarily for the piano. He is one of the most renown composers for the instrument and rarely parted with his beloved piano.</strong></p>
</div>
<div class="underpart">
<h2 style="text-align:center">Some highlights of Chopin's life:</h2>
<ul>
<li><strong>1810:</strong> Chopin is born in a Polish state at the time</li>
<li><strong>1830:</strong> Left poland after completing his musical education as a prodigy</li>
<li><strong>1832:</strong> Debut Paris concert at the Salle Pleyel, drawing universal attention</li>
<li><strong>1834:</strong> Attended the Lower Rhenish Music Festival in Aix-la-Chapelle, where he met the famous musicians, Mendelssohn</li>
<li><strong>1839:</strong> Chopin would spend the next 4 years sole composing music</li>
<li><strong>1842:</strong> From this point on, Chopin shows signs of serious illness and had to decline performances due to symptoms</li>
<li><strong>1844:</strong> Composed fewer and fewer pieces as the years went from this point</li>
<li><strong>1848:</strong> Leaves for a series of concerts in London during the Revolution of 1848 in Paris</li>
<li><strong>1848:</strong> Last public appearance was on a concert platform at London's Guildhall, by this stage he was terminally ill</li>
<li><strong>1849:</strong> Chopin died of what is believed to be cystic fibrosis at the age of 39</li>
</ul>
<p style="font-size:1.5em">"The most vigorous applause seemed not to suffice to our enthusiasm in the presence of this talented musician, who revealed a new phase of poetic sentiment combined with such happy innovation in the form of his art."</p>
<p style="color:#606060; font-size:1.2em; margin-top:-25px"><em> -- Franz Liszt in attendance of Chopin's Parisian debut at the Salle Pleyel, 1832</em></p>
<p style="font-size:1.7em">Listen to chopin's greatest works on this <a href="https://www.youtube.com/watch?v=9E6b3swbnWg&list=RD9E6b3swbnWg#t=0" target="blank" style="text-decoration:none">youtube playlist</a></p>
<p style="font-size:1.7em; padding-bottom:15px"><strong>OR</strong> read more about him on his <a href="https://en.wikipedia.org/wiki/Fr%C3%A9d%C3%A9ric_Chopin" target="blank" style="text-decoration:none">wikipedia page</a></p>
</div>
</div>
.whole {
background-color: #FF6868;
margin-top: -13px;
margin-bottom: -16px;
color: #303030;
}
.whitepart {
margin: auto;
position: static;
width: 830px;
text-align: left;
border-radius: 50px;
}
.underpart {
display: block;
margin: auto;
position: static;
width: 830px;
text-align: left;
border-radius: 50px;
}
.chopin {
width: 800px;
border: 4px solid #606060;
border-radius: 60px;
}
.image {
text-align: center;
padding-top: 20px;
}
Also see: Tab Triggers