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.
<header class="border-bottom border-3 border-dark mb-5">
<nav class="navbar navbar-expand-md navbar-dark .bg-light" style="background-color: #75a0a7 !important">
<div class="container-xl">
<a class="navbar-brand" href="index.html"><img src="https://assets.codepen.io/6306176/gulp-logo-light.png" alt="Gulp Coffee logo" width="150" /></a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ms-auto mb-2 mb-lg-0">
<li class="nav-item">
<h5><a class="nav-link fs-4" href="https://codepen.io/lucia-mendez-the-sasster/pen/zYeMZXp">
About</a></h5>
</li>
<li class="nav-item">
<h5><a href="https://codepen.io/lucia-mendez-the-sasster/pen/dyaQevd" class="nav-link fs-4">
Locations</a></h5>
</li>
<li class="nav-item">
<h5><a href="https://codepen.io/lucia-mendez-the-sasster/pen/NWomzMV?editors=1000" class="nav-link fs-4">FAQ</a></h5>
</li>
<li class="nav-item">
<h5><a href="https://codepen.io/lucia-mendez-the-sasster/pen/NWomzMV" class="nav-link fs-4">Coffee</a></h5>
</li>
<li class="nav-item">
<h5><a href="https://codepen.io/lucia-mendez-the-sasster/pen/dyaQevd" class="nav-link fs-4">
Contact</a></h5>
</li>
</ul>
</div>
</div>
</nav>
</header>
<div class="container-xl text-center text-secondary">
<section>
<p class="text-center">
<h1>Best Coffee in the Bay Area</h1>
<p>Our Roasted Coffee Beans offers the world a chance to brighten every day with a whole lot of flavor and inspiration.</p>
<p class="d-inline-flex gap-1">
<button class="btn btn-primary" style="background-color: #215660 !important" type="button" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample">
Coffee Warning
</button>
</p>
<div class="collapse p-3 bg-warning text-body-secondary" id="collapseExample" style="Background-color: #75a0a7 !important">
<div class="card card-body">Drinking more than 4 cups of coffee daily is possibly unsafe. Drinking large amounts might cause side effects due to the caffeine content. These side effects can range from mild to serious and include headache and irregular heartbeat.
</div>
</div>
<div class="row">
<div class="col-sm-12 col-md-6 col-lg-4 mt-3 d-flex">
<div class="card bg-dark text-light rounded-4" style="background-color: #215660 !important">
<h2 class="card-header">Columbian-Blended Espresso Beans</h2>
<img src="https://assets.codepen.io/6306176/gulp-espresso.jpg" alt="gulp espresso" class="img-fluid">
<div class="card-body">
<p class="fst-italic">Bourbon · Cherry · Milk Chocolate </p>
<p>With our Columbian-Blended Espresso Beans, you can finally feel like a professional barista. Bright and clean with an intense burst of flavor, these full-bodied beans strike a perfect balance between the most delicate roasts and fruitful aromas.
Brew Method: Espresso machine Sizes: 12 oz.: $20 5 lb.: $90</p>
</div>
<div class="card-footer text-center">
<p><a href="https://codepen.io/lucia-mendez-the-sasster/pen/NWomzMV" class="btn btn-dark" style="background-color: #75a0a7 !important">Try Today</a></p>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 mt-3 d-flex">
<div class="card bg-dark text-light rounded-4" style="background-color: #215660 !important">
<h2 class="card-header">Triple-Blended Coffee Beans</h2>
<img src="https://assets.codepen.io/6306176/gulp-triple-blended.jpg " alt="gulp triple blend." class="img-fluid">
<div class="card-body">
<p class="fst-italic">Dark chocolate · Caramel · Papaya</p>
<p>A skillfully roasted and carefully blended, our Triple-Blended Coffee Beans don’t just wake you up in the morning, they pack a lasting punch that's sure to leave you wanting more. With silky smoothness and layered flavors, there’s really no better way to start your day.
Brew method: French press. Sizes: 12 oz.: $18 5 lb.: $85</p>
</div>
<div class="card-footer text-center">
<p><a href="https://codepen.io/lucia-mendez-the-sasster/pen/NWomzMV" class="btn btn-dark" style="background-color: #75a0a7 !important">Buy Blend</a></p>
</div>
</div>
</div>
<div class="col-sm-12 col-md-6 col-lg-4 mt-3 d-flex">
<div class="card bg-dark text-light rounded-4" style="background-color: #215660 !important">
<h2 class="card-header">Lightly Roasted Coffee Beans</h2>
<img src="https://assets.codepen.io/6306176/gulp-light-roast.jpg " alt="gulp-light-roast" class="img-fluid">
<div class="card-body">
<p class="fst-italic">Cherry · Mangosteen · Fig</p>
<p>Our Lightly Roasted Coffee Beans offer the world a chance to brighten every day with a whole lot of flavor and inspiration. Try these to receive the perfect balance between bold flavor and subtle sweetness. Brew method: Aeropress Sizes: 12 oz.: $18 5 lb.: $85</p>
</div>
<div class="card-footer text-center">
<p><a href="https://codepen.io/lucia-mendez-the-sasster/pen/NWomzMV" class="btn btn-dark" style="background-color: #75a0a7 !important">Get it Today</a></p>
</div< /div>
</div>
</div>
</section>
</div>
<footer class="border-dark border-top border-3 text-center py-5 mt-5" style="background-color: #75a0a7 !important">
<div class="container-sm">
<p>©2022 Trilogy Education Services, a 2U, Inc. brand. All Rights Reserved.</p>
<p><small>This site is operated by Trilogy Education Services for educational purposes only. This is not a coffee products website. This is a fictitious company and scenario intended only for internal academic purposes.</small></p>
</div>
</footer>
Also see: Tab Triggers