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.
<link href="https://fonts.googleapis.com/css?family=Satisfy|Oxygen|Anton" rel="stylesheet">
<div id="first-div" class="container-fluid h-100">
<div class="container-fluid">
<div id="cover-image" class="row">
<div class="col-12 mx-auto text-center">
<h1 id="main-title">Johnny Cash</h1>
</div>
</div>
<div class="row-fluid">
<div id="article" class="col-lg-8 mx-auto">
<pullqoute id="pullqoute" class="text-center">
“Hello, I'm Johnny Cash”
</pullqoute>
<h2 id="article-title">John R. Cash (February 26, 1932 – September 12, 2003)</h2>
<p>was an American singer-songwriter, guitarist, actor, and author. He is widely considered one of the most influential popular musicians of the 20th century and is one of the best-selling music artists of all time, having sold more than 90 million records worldwide. Although primarily remembered as a country music icon, his genre-spanning songs and sound embraced rock and roll, rockabilly, blues, folk, and gospel. This crossover appeal won Cash the rare honor of multiple inductions in the Country Music, Rock and Roll, and Gospel Music Halls of Fame.</p>
<p>
Cash was known for his deep, calm bass-baritone voice, the distinctive sound of his Tennessee Three backing band, which is characterized by train-sound guitar rhythms; a rebelliousness coupled with an increasingly somber and humble demeanor, free prison concerts, and a trademark, all-black stage wardrobe, which earned him the nickname "The Man in Black." He traditionally began his concerts by simply introducing himself, "Hello, I'm Johnny Cash," followed by his signature song "Folsom Prison Blues".
</p>
<p>
Much of Cash's music contained themes of sorrow, moral tribulation, and redemption, especially in the latter stages of his career. His signature songs include "I Walk the Line", "Folsom Prison Blues", "Ring of Fire", "Get Rhythm", and "Man in Black". He also recorded humorous numbers like "One Piece at a Time" and "A Boy Named Sue"; a duet with his future wife, June Carter, called "Jackson" (followed by many further duets after their marriage); and railroad songs including "Hey, Porter", "Orange Blossom Special" and "Rock Island Line". During the last stage of his career, Cash covered songs by several late 20th-century rock artists, notably "Hurt" by Nine Inch Nails and "Personal Jesus" by Depeche Mode.
</p>
</div>
</div>
<div class="row-fluid">
<div class="col-lg-8 mx-auto">
<h2>10 Biggest Hits</h2>
<ul>
<li><strong>I Walk the Line -</strong> With His Hot and Blue Guitar (1957)
</li>
<li><strong>Folsom Prison Blues -</strong> At Folsom Prison (1968)</li>
<li><strong>Ring of Fire -</strong> Ring of Fire: The Best of Johnny Cash (1963)</li>
<li><strong>Hurt -</strong> American IV: The Man Comes Around (2002)
</li>
<li><strong>Sunday Morning Coming Down -</strong> Sunday Morning Coming Down (1972)</li>
<li><strong>Jackson -</strong> Greatest Hits Vol. 1 (1967)
</li>
<li><strong>One Piece at a Time -</strong> One Piece at a Time (1976)</li>
<li><strong>A Boy Named Sue -</strong> At San Quentin (1969)</li>
<li><strong>Rusty Cage -</strong> Unchained (1996)
</li>
<li><strong>Man in Black -</strong> Man in Black (1971)
</li>
</ul>
<hr>
<p id="info" class="text-center">
In case that you want to know more about Johnny Cash, please visit <a href="http://www.johnnycash.com" target="_blank">Johnny's website</a> or <a href="https://en.wikipedia.org/wiki/Johnny_Cash" target="_blank">wikipedia</a>
</p>
</div>
<div class="row-fluid">
<div class="col-lg-8 mx-auto text-center">
<hr>
<footer>
<em>Design and code - <a href="https://codepen.io/Cigi_69/" target="_blank">Michal Cigáň</a>. Source - <a href="https://en.wikipedia.org/wiki/Johnny_Cash" target="_blank">wikipedia</a>.</em>
</footer>
</div>
</div>
</div>
</div>
</div>
#first-div, .col-12 {
padding: 0;
}
#cover-image {
background: url("https://wallpapercave.com/wp/OEAmYUP.jpg") 50% top no-repeat;
z-index: -1;
height: 600px;
}
h1, h2, h3, h4, h5 {
font-family: 'Anton', sans-serif;
}
h1 {
color: #ddd;
font-size: 78px;
font-weight: 900;
text-align: center;
}
#main-title {
background: rgba(0, 0, 0, .4) 50% 50% no-repeat;
padding: 45px 0 45px 0;
margin: 215px auto;
max-width: 1920px;
text-align: center;
}
#article-title {
padding-top: 85px;
}
h2 {
padding-top: 45px;
}
p {
font-family: 'Oxygen', sans-serif;
font-size: 18px;
}
#pullqoute {
color: #ccc;
font-family: 'Satisfy', cursive;
font-size: 58px;
line-height: 1em;
display: block;
transform: rotate(-6deg);
margin-top: 90px;
}
ul {
margin-bottom: 55px;
}
#info {
font-size: 18px;
}
footer {
font-size: 14px;
padding: 15px;
}
footer span {
color: #1327c9;
}
a:focus,
a:hover {
text-decoration: none;
}
Also see: Tab Triggers