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.
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
<style>
body {background-color: #a3a3a3;
background-image: url("https://images.unsplash.com/photo-1495420434947-41fd0fbab21f?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=fe15a192633e9f51cf05ecef74135402&auto=format&fit=crop&w=751&q=80")};
</style>
<div class="container">
<div class="row">
<div class="col-4">
<h1 class="silver text-position">Steve Jobs</h1>
<h4 class="white quote-size">“Innovation distinguishes between a leader and a follower.”</h4>
</div>
<div class="col-4">
<img src="https://lh3.googleusercontent.com/-TY6WJCnMHo0/WntKgHJYIhI/AAAAAAAAACs/IbZUUNT-sfMVbPvwUmGFhcVjQ85BW26KwCJoC/w530-h706-n-rw/Fantastiques-portraits-de-Steve-Jobs-allwelikes.com-1.jpg" class="img-position " width= "250" height="330" alt="Here should be photo">
</div>
<div class="">
<h1 class="silver text-position2">A timeline</h1>
<h4 class></h4>
</div>
</div>
<div>
<h4 class="silver text-size col"><nobr>20 Most Memorable Quotes </br>From Steve Jobs</nobr></h4>
<h4 class="white">1. “We don’t get a chance to do that many things, and every one should be really excellent. Because this is our life. Life is brief, and then you die, you know? And we’ve all chosen to do this with our lives. So it better be damn good. It better be worth it.”</h4>
<h4 class="white">2. “That’s been one of my mantras — focus and simplicity. Simple can be harder than complex; you have to work hard to get your thinking clean to make it simple.”</h4>
<h4 class="white">3. “Your time is limited, don’t waste it living someone else’s life. Don’t be trapped by dogma, which is living the result of other people’s thinking. Don’t let the noise of other opinions drown your own inner voice. And most important, have the courage to follow your heart and intuition, they somehow already know what you truly want to become. Everything else is secondary.”</h4>
<h4 class="white">4. “I think if you do something and it turns out pretty good, then you should go do something else wonderful, not dwell on it for too long. Just figure out what’s next.”</h4>
<h4 class="white">5. “Quality is much better than quantity. One home run is much better than two doubles.”</h4>
<h4 class="white">6. “Innovation distinguishes between a leader and a follower.”7. “Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations.”</h4>
<h4 class="white">7. “Sometimes when you innovate, you make mistakes. It is best to admit them quickly, and get on with improving your other innovations.”</h4>
<h4 class="white">8. “When you’re a carpenter making a beautiful chest of drawers, you’re not going to use a piece of plywood on the back, even though it faces the wall and nobody will see it. You’ll know it’s there, so you’re going to use a beautiful piece of wood on the back. For you to sleep well at night, the aesthetic, the quality, has to be carried all the way through.”</h4>
<h4 class="white">9. “Creativity is just connecting things. When you ask creative people how they did something, they feel a little guilty because they didn’t really do it, they just saw something. It seemed obvious to them after a while.”</h4>
<h4 class="white">10. “My model for business is The Beatles. They were four guys who kept each other’s kind of negative tendencies in check. They balanced each other and the total was greater than the sum of the parts. That’s how I see business: great things in business are never done by one person, they’re done by a team of people.”</h4>
<h4 class="white">11. “Design is not just what it looks like and feels like. Design is how it works.”</h4>
<h4 class="white">12. “What a computer is to me is the most remarkable tool that we have ever come up with. It’s the equivalent of a bicycle for our minds.”13. “Here’s to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes… The ones who see things differently — they’re not fond of rules… You can quote them, disagree with them, glorify or vilify them, but the only thing you can’t do is ignore them because they change things… They push the human race forward, and while some may see them as the crazy ones, we see genius, because the ones who are crazy enough to think that they can change the world, are the ones who do.”</h4>
<h4 class="white">13. “Here’s to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes… The ones who see things differently — they’re not fond of rules… You can quote them, disagree with them, glorify or vilify them, but the only thing you can’t do is ignore them because they change things… They push the human race forward, and while some may see them as the crazy ones, we see genius, because the ones who are crazy enough to think that they can change the world, are the ones who do.”</h4>
<h4 class="white">14. “It’s better to be a pirate than to join the navy.”</h4>
<h4 class="white">15. “Stay hungry. Stay foolish.”</h4>
<h4 class="white">16. “You can’t connect the dots looking forward; you can only connect them looking backward. So you have to trust that the dots will somehow connect in your future. You have to trust in something — your gut, destiny, life, karma, whatever. This approach has never let me down, and it has made all the difference in my life.”</h4>
<h4 class="white">17. “Your work is going to fill a large part of your life, and the only way to be truly satisfied is to do what you believe is great work. And the only way to do great work is to love what you do. If you haven’t found it yet, keep looking. Don’t settle. As with all matters of the heart, you’ll know when you find it.”</h4>
<h4 class="white">18. “Be a yardstick of quality. Some people aren’t used to an environment where excellence is expected.”</h4>
<h4 class="white">19. “If you want to live your life in a creative way, as an artist, you have to not look back too much. You have to be willing to take whatever you’ve done and whoever you were and throw them away.”</h4>
</div>
</div>
.silver {
color: silver;
}
.white {
color: white;
}
.img-position {
margin-top: 55px;
margin-left: 30px;
}
.text-position {
margin-top: 150px;
font-size: 70px;
}
.text-position2 {
margin-top: 150px;
font-size: 70px;
}
.text-size {
font-size: 45px;
margin-top: 100px;
margin-left:-20px;
}
.quote-size {
font-size: 30px;
}
Also see: Tab Triggers