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.
<!-- Stripe Checkout.js + HTML5 Range TEMPLATE
By Niels Klom.-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
<title>The Coffeehouse</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://cssgram-cssgram.netdna-ssl.com/cssgram.min.css">
</head>
<body>
<nav role="navigation">
<div class="nav-wrapper container">
<a id="logo-container" href="#" class="brand-logo center">Give a Coffee</a>
</div>
</nav>
<div id="index-banner" class="parallax-container">
<div class="section no-pad-bot">
<div class="container">
</div>
</div>
<div class="parallax"><img src="http://www.lifeofpix.com/wp-content/uploads/2015/09/Life-of-Pix-free-stock-photos-table-coffee-heart-leeroy.jpg" class="coffee walden"></div>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center "><i class="fa fa-coffee"></i></h2>
<h5 class="center">Great Coffee</h5>
<p class="">Everyone deserves a great cup of Coffee sometimes! That's why we've got a great idea. You can purchase a cup of Coffee for those who aren't as blessed as
yourself at retail price.
</p>
</div>
</div>
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center "><i class="fa fa-gift"></i></h2>
<h5 class="center">Free Of Charge</h5>
<p class="">One cup of coffee costs $1.25, and we'll add an extra cup every 5 dollars. For all you non-mathletes out there, that's 5 cups for 5 dollars.</p>
</div>
</div>
<div class="col s12 m4">
<div class="icon-block">
<h2 class="center "><i class="fa fa-users"></i></h2>
<h5 class="center">For Everyone</h5>
<p class="">Coffee will be handed out at shelters, offices, schools and our stores to those that deserve it the most. Of course we'll let them know who got it for them!</p>
</div>
</div>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
</div>
</div>
<div class="parallax"><img src="http://mmt.li/wp-content/uploads/2015/02/IMG_1462.jpg" class="coffee toaster"></div>
</div>
<div class="container">
<div class="section">
<div class="row">
<div class="col s12 center">
<h3><i class="fa fa-money"></i></h3>
<h4>Made up your mind?</h4>
<form action="#">
<input type="checkbox" id="accept" />
<label for="accept">By proceeding your agree to our terms, which are completely unfair and well, not very real.</label>
<br/>
<button class="waves-effect btn" style="margin-top: 15px;" id="launch" disabled>Let's Go</button>
</form>
</div>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
</div>
</div>
<div class="parallax"><img src="https://mmtstock.s3.amazonaws.com/photos/IMG1026152.jpg" class="coffee earlybird"></div>
</div>
<footer class="page-footer">
<div class="container">
<div class="row">
<div class="col s12 m9" id="demo">
<h5 class="white-text center">Just a Demo</h5>
<p class="grey-text text-lighten-4">Don't be disappointed, but this is just a demo for Stripe's checkout.js. You can give it a try with the test Cards.</p>
</div>
<div class="col s12 m3" id="demo-cards">
<h5 class="white-text center">Demo Cards</h5>
<ul class="white-text">
<li><i class="fa fa-cc-visa blue-text" style="font-size: 20px"></i> 4242-4242-4242-4242</li>
<li><i class="fa fa-cc-mastercard blue-text" style="font-size: 20px"></i> 5555-5555-5555-4444</li>
</ul>
</div>
</div>
</div>
<div class="footer-copyright">
<div class="container">
Made by <a href="http://www.nielsklom.eu">Niels Klom</a> using <a class="" href="http://materializecss.com">Materialize</a>.
</div>
</div>
</footer>
<script src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script src="http://nielsklom.eu/flight_demo/js/materialize.js"></script>
<script src="https://flightjs.github.io/release/latest/flight.min.js"></script>
<script src="https://checkout.stripe.com/checkout.js"></script>
</body>
<!--
Images provided by:
http://mmt.li/
http://www.lifeofpix.com/
-->
// Materialize Plugins
$( document ).ready(function() {
$('.parallax').parallax();
});
Also see: Tab Triggers