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.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bound Together</title>
<link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="body">
<header id="header">
<nav id="nav-bar">
<ul>
<li> <a href="#products" class="nav-link">OUR BOOKS</a> </li>
<li> <a href="#recipes" class="nav-link">INSPIRATION</a> </li>
<li> <a href="#about" class="nav-link"> OUR STORY</a> </li>
<li> <a href="#contact" class="nav-link">CONTACT US</a> </li>
</ul>
</nav>
<img id="header-img" src="https://github.com/NadineJackson1/boundTogether/blob/main/BoundTogetherlogo.png?raw=true" alt="Company Logo">
</header>
<img id="banner-img" src="https://images.unsplash.com/photo-1571075056982-fba6e76312d6?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1374&q=80" alt="Banner">
<section id="products">
<h2><strong> SHOP OUR BOOKS </strong> </h2>
<p> Shop our weekly picks here and get them delivered right to your doorstep! You can also pick them up at your favorite location.
<div id="div-image">
<div id="picture-description"> <img id="product-img" src="https://images.unsplash.com/photo-1589666788370-cf6ba244bda2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1471&q=80" alt="Meyer Lemon Cream with Graham Crackers and Sea Salt">
<p> Gone with the Wind </p>
<p> $5 </p>
</div>
<div id="picture-description"> <img id="product-img" src="https://images.unsplash.com/photo-1589786016301-66799fe1b36c?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80" alt="No-Bake Chocolate Cream Pie with Toasted Meringue">
<p> Little Women </p>
<p> $7 </p>
</div>
<div id="picture-description"> <img id="product-img" src="https://images.unsplash.com/photo-1529589585661-8fb5cdc75c48?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Nnx8Y2xhc3NpYyUyMGJvb2tzfGVufDB8MHwwfHw%3D&auto=format&fit=crop&w=900&q=60" alt="BA's Best Key Lime Pie">
<p> Flowers Shown to the Children </p>
<p> $12 </p>
</div>
<div id="picture-description"> <img id="product-img" src="https://images.unsplash.com/photo-1493306432015-51bdefc0dd68?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80" alt="Raspberry-Ricotta Cake">
<p> The Iliad and the Odyssey </p>
<p> $9 </p>
</div>
<div id="picture-description"> <img id="product-img" src="https://images.unsplash.com/photo-1573125716783-d05b57a86488?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1470&q=80" alt="Blood Orange Buttermilk Upside-Down Cake">
<p> Pride and Prejudice </p>
<p> $5 </p>
</div>
<div id="picture-description"> <img id="product-img" src="https://images.unsplash.com/photo-1615416300468-51050fcb7a3d?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1472&q=80" alt="Chocolate-Caramel Pecan Tart">
<p> The Great Gatsby </p>
<p> $8 </p>
</div>
</div>
</section>
<section id="recipes">
<h2><strong> INSPIRATION </strong></h2>
<p> Owning classic literature is like taking a step into a time maching. Pull up a chair and grab your favorite journal. It's time to take notes! </p>
<div id="div-video">
<div id="vid-cont"> <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/EG8MSvxDV50" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p> Basic Book Restoration and Repair: Cleaning Cloth and Leather by Tim Clark </p>
</div>
<div id="vid-cont"> <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/XOLrRdVsFZU" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p> 9 Stylish Ways To Organize Your Bookshelf by BuzzFeed Nifty </p>
</div>
<div id="vid-cont"> <iframe id="video" width="560" height="315" src="https://www.youtube.com/embed/rwoRrZy-qvQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<p> Which Editions of Classics Should you Buy? with Ania Bell's Jar</p>
</div>
</div>
</section>
<h2><strong> OUR STORY </strong></h2>
<section id="about">
<p> In 2006, Bound Together Book Shop opened its first location on a quiet street corner in the heart of Dayton’s Oregon District. From its inception, Bound Together has been cherished for its classic yet unique collection of literature, warm cozy decor and inviting atmosphere. In 2010, the original owner passed her oven reading glasses to Carlita Jackson. She has thoughtfully expanded the book shop from its first Oregon District shop to locations worldwide. Today, Bound Together Book Shop can be found in Denver, Los Angeles, Phoenix, Boston, Dubai, and Vienna. <br>
Patrons are also invited to place pickup orders for select books through our online store. We are also pleased to offer nationwide shipping for a variety of products, including books, journals, comics and vinyl records, as well as gift packages and special edition collections.</p>
<img id="banner-img2" src="https://images.unsplash.com/photo-1575220325879-3a26c0947b53?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=687&q=80" alt="Banner 2">
</section>
<img id="logo" src="https://github.com/NadineJackson1/boundTogether/blob/main/BoundTogetherlogo.png?raw=true" alt="Company Logo">
<section id="contact">
<form id="form" action="#">
<label id="email-label" for="email"> <strong> ENTER YOUR E-MAIL TO JOIN OUR NEWSLETTER</strong> </label> <br>
<input type="email" name="email" required id="email" placeholder="Your e-mail" class="input font">
<input id="submit" type="submit" value="Submit">
</form>
</section>
</div>
</body>
</html>
* {
font-family: 'Cormorant Garamond', serif;
box-sizing: border-box;
}
@media (max-width: 575.98px) {
ul {
visibility: hidden;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
li a {
float: none;
display: block;
text-align: left;
}
#picture-description {
flex-basis: 100% !important;
}
#about{
flex-direction: column !important;
}
#banner-img2{
width: 100% !important;
margin: 16px 0 !important;
}
}
#body{
max-width: 960px;
margin: 0 auto;
}
header {
display: flex;
position: sticky;
top: 0;
width: 100%;
max-width: 960px;
background-color: white;
height: 60px;
}
li {
display: inline;
}
ul{
margin: 0;
padding:0;
}
#header-img {
width: 185px;
height: auto;
align-self: center;
margin-left: auto;
}
#nav-bar {
padding: 0 0.5rem;
align-self: center;
}
#banner-img {
width: 100%;
}
#product-img {
width: 100%;
}
#div-image{
display: flex;
flex-wrap: wrap;
}
#picture-description{
padding: 16px;
flex-basis: 33.33%;
text-align: center;
}
#div-video{
display: flex;
width: 100%;
flex-wrap: wrap;
}
#vid-cont {
flex-basis: 33.33%;
margin: 0 auto;
text-align: center;
}
#video {
width: 313px;
height: 313px;
padding: 16px;
}
.nav-link{
text-decoration: none;
color: black;
padding: 0 0.5rem;
}
.nav-link:hover{
color: #dcd8e8;
text-decoration: underline;
}
#logo {
width: 100px;
align-self: center;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 1rem;
}
p {
font-size: 18px;
}
#banner-img2{
width: 50%;
margin-left: 1rem;
}
#about{
display: flex;
flex-direction: row;
width: 100%;
text-align: justify;
}
#about p{
margin: 0;
}
#contact {
padding: 1rem 0;
background-color: #a4c0b7;
padding-bottom: 0.5rem;
padding-top: 0.5rem;
text-align: center;
display: block;
}
#submit{
padding: 0.25rem 1rem;
border-radius: 15px;
border: 0;
color: white;
background-color: #7ba0b5;
margin-left: 1rem;
}
input{
margin-top: 1rem;
padding: 0.25rem 0.5rem;
font-size: 18px;
border-radius: 15px;
border: 0;
}
Also see: Tab Triggers