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="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!--Important source web from link "https://bootsnipp.com/snippets/aMDKk"-->
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.2.0/css/all.css" integrity="sha384-hWVjflwFxL6sNzntih27bfxkr27PmbbK/iSvJ+a4+0owXq79v+lsFkW54bOGbiDQ" crossorigin="anonymous">
<div class="container">
<h3 class="pb-3 mb-4 font-italic border-bottom">
Card Styles
</h3>
<div class="row">
<div class="col-md-6">
<div class="card flex-md-row mb-4 shadow-sm h-md-250">
<div class="card-body d-flex flex-column align-items-start">
<strong class="d-inline-block mb-2 text-primary">World</strong>
<h6 class="mb-0">
<a class="text-dark" href="#">40 Percent of People Can’t Afford Basics</a>
</h6>
<div class="mb-1 text-muted small">Nov 12</div>
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
<a class="btn btn-outline-primary btn-sm" role="button" href="http://www.jquery2dotnet.com/">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-lg-block" alt="Thumbnail [200x250]" src="//placeimg.com/250/250/arch" style="width: 200px; height: 250px;">
</div>
</div>
<div class="col-md-6">
<div class="card flex-md-row mb-4 shadow-sm h-md-250">
<div class="card-body d-flex flex-column align-items-start">
<strong class="d-inline-block mb-2 text-success">Health</strong>
<h6 class="mb-0">
<a class="text-dark" href="#">Food for Thought: Diet and Brain Health</a>
</h6>
<div class="mb-1 text-muted small">Nov 11</div>
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
<a class="btn btn-outline-success btn-sm" href="http://www.jquery2dotnet.com/">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-lg-block" alt="Thumbnail [200x250]" src="//placeimg.com/250/250/nature" style="width: 200px; height: 250px;">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="card border-primary flex-md-row mb-4 shadow-sm h-md-250">
<div class="card-body d-flex flex-column align-items-start">
<strong class="d-inline-block mb-2 text-primary">World</strong>
<h6 class="mb-0">
<a class="text-dark" href="#">40 Percent of People Can’t Afford Basics</a>
</h6>
<div class="mb-1 text-muted small">Nov 12</div>
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
<a class="btn btn-outline-primary btn-sm" role="button" href="http://www.jquery2dotnet.com/">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-lg-block" alt="Thumbnail [200x250]" src="//placeimg.com/250/250/arch" style="width: 200px; height: 250px;">
</div>
</div>
<div class="col-md-6">
<div class="card border-success flex-md-row mb-4 shadow-sm h-md-250">
<div class="card-body d-flex flex-column align-items-start">
<strong class="d-inline-block mb-2 text-success">Health</strong>
<h6 class="mb-0">
<a class="text-dark" href="#">Food for Thought: Diet and Brain Health</a>
</h6>
<div class="mb-1 text-muted small">Nov 11</div>
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
<a class="btn btn-outline-success btn-sm" href="http://www.jquery2dotnet.com/">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-lg-block" alt="Thumbnail [200x250]" src="//placeimg.com/250/250/nature" style="width: 200px; height: 250px;">
</div>
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="card text-white bg-primary flex-md-row mb-4 shadow-sm h-md-250">
<div class="card-body d-flex flex-column align-items-start">
<strong class="d-inline-block mb-2 text-white">World</strong>
<h6 class="mb-0">
<a class="text-white" href="#">40 Percent of People Can’t Afford Basics</a>
</h6>
<div class="mb-1 text-white-50 small">Nov 12</div>
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
<a class="btn btn-outline-light btn-sm" role="button" href="http://www.jquery2dotnet.com/">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-lg-block" alt="Thumbnail [200x250]" src="//placeimg.com/250/250/arch" style="width: 200px; height: 250px;">
</div>
</div>
<div class="col-md-6">
<div class="card text-white bg-success flex-md-row mb-4 shadow-sm h-md-250">
<div class="card-body d-flex flex-column align-items-start">
<strong class="d-inline-block mb-2 text-white">Health</strong>
<h6 class="mb-0">
<a class="text-white" href="#">Food for Thought: Diet and Brain Health</a>
</h6>
<div class="mb-1 text-white-50 small">Nov 11</div>
<p class="card-text mb-auto">This is a wider card with supporting text below as a natural lead-in to additional content.</p>
<a class="btn btn-outline-light btn-sm" href="http://www.jquery2dotnet.com/">Continue reading</a>
</div>
<img class="card-img-right flex-auto d-none d-lg-block" alt="Thumbnail [200x250]" src="//placeimg.com/250/250/nature" style="width: 200px; height: 250px;">
</div>
</div>
</div>
<div class="row">
<div class="col-md-4">
<div class="card mb-4">
<img class="card-img-top" src="//placeimg.com/290/180/any" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="http://www.jquery2dotnet.com/" class="btn btn-outline-dark btn-sm">Go somewhere</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-4 border-dark">
<img class="card-img-top" src="//placeimg.com/290/180/any" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="http://www.jquery2dotnet.com/" class="btn btn-dark btn-sm">Go somewhere</a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-4 text-white bg-dark">
<img class="card-img-top" src="//placeimg.com/290/180/any" alt="Card image cap">
<div class="card-body">
<h5 class="card-title">Card title</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="http://www.jquery2dotnet.com/" class="btn btn-outline-light btn-sm">Go somewhere</a>
</div>
</div>
</div>
</div>
<h3 class="mt-3 pb-3 mb-4 font-italic border-bottom">
Image overlays
</h3>
<div class="row">
<div class="col-md-8">
<div class="card mb-4 bg-dark text-white">
<img class="card-img" src="//placeimg.com/780/270/any" alt="Card image">
<div class="card-img-overlay">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text">Last updated 3 mins ago</p>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card mb-4 bg-dark text-white">
<img class="card-img" src="//placeimg.com/250/180/any" alt="Card image">
<div class="card-img-overlay">
<h5 class="card-title">Card title</h5>
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional content. This content is a little bit longer.</p>
<p class="card-text">Last updated 3 mins ago</p>
</div>
</div>
</div>
</div>
<h3 class="mt-3 pb-3 mb-4 font-italic border-bottom">
Social Cards
</h3>
<div class="row">
<div class="col-md-3">
<div class="card mb-4">
<div class="social-card-header align-middle text-center bg-facebook">
<i class="fab fa-facebook-square"></i>
</div>
<div class="card-body text-center">
<div class="row">
<div class="col border-right">
<i class="far fa-thumbs-up text-facebook"></i>
<span class="text-muted">Like</span>
<div class="font-weight-bold">12K</div>
</div>
<div class="col">
<i class="fas fa-share-alt text-facebook"></i>
<span class="text-muted">Share</span>
<div class="font-weight-bold">10K</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card mb-4">
<div class="social-card-header align-middle text-center bg-google-plus">
<i class="fab fa-google-plus-square"></i>
</div>
<div class="card-body text-center">
<div class="row">
<div class="col border-right">
<i class="fab fa-google-plus-g text-google-plus"></i>
<span class="text-muted">Like</span>
<div class="font-weight-bold">12K</div>
</div>
<div class="col">
<i class="fas fa-share-alt text-google-plus"></i>
<span class="text-muted">Share</span>
<div class="font-weight-bold">10K</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card mb-4">
<div class="social-card-header align-middle text-center bg-twitter">
<i class="fab fa-twitter-square"></i>
</div>
<div class="card-body text-center">
<div class="row">
<div class="col border-right">
<i class="fab fa-twitter text-twitter"></i>
<span class="text-muted">Tweet</span>
<div class="font-weight-bold">12K</div>
</div>
<div class="col">
<i class="fas fa-share-alt text-twitter"></i>
<span class="text-muted">Share</span>
<div class="font-weight-bold">10K</div>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-3">
<div class="card mb-4">
<div class="social-card-header align-middle text-center bg-pinterest">
<i class="fab fa-pinterest-square"></i>
</div>
<div class="card-body text-center">
<div class="row">
<div class="col border-right">
<i class="fab fa-pinterest-p text-pinterest"></i>
<span class="text-muted">Pin</span>
<div class="font-weight-bold">12K</div>
</div>
<div class="col">
<i class="fas fa-share-alt text-pinterest"></i>
<span class="text-muted">Share</span>
<div class="font-weight-bold">10K</div>
</div>
</div>
</div>
</div>
</div>
</div>
<h3 class="mt-3 pb-3 mb-4 font-italic border-bottom">
More Cards
</h3>
<div class="row">
<div class="col-md-4">
<div class="card">
<img class="card-img-top" src="//placeimg.com/280/180/tech" alt="Card image cap">
<div class="card-body">
<h5 class="card-title border-bottom pb-3">Card title <a href="#" class="float-right d-inline-flex share"><i class="fas fa-share-alt text-primary"></i></a></h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="float-right">Read more <i class="fas fa-angle-double-right"></i></a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card">
<img class="card-img-top" src="//placeimg.com/280/180/tech" alt="Card image cap">
<div class="card-body">
<h5 class="card-title border-bottom pb-3">Card title <a href="#" class="float-right btn btn-sm btn-info d-inline-flex share"><i class="fas fa-share-alt"></i></a></h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-sm btn-info float-right">Read more <i class="fas fa-angle-double-right"></i></a>
</div>
</div>
</div>
<div class="col-md-4">
<div class="card bg-light">
<img class="card-img-top" src="//placeimg.com/280/180/tech" alt="Card image cap">
<div class="card-body">
<h5 class="card-title border-bottom pb-3">Card title <a href="#" class="float-right btn btn-sm btn-info d-inline-flex share"><i class="fas fa-share-alt"></i></a></h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-sm btn-info float-right">Read more <i class="fas fa-angle-double-right"></i></a>
</div>
</div>
</div>
</div>
<hr>
<a href="http://www.jquery2dotnet.com/" class="mx-auto pb-3 text-center">
<img alt="jQuery 2 DotNet" class="rounded mx-auto d-block" height="52px;" src="http://1.bp.blogspot.com/-z27K-NYYSi4/Vsg9Mdl1A_I/AAAAAAAAEbo/SbDbMENIiVQ/s1600-r/jQuery2DotNet.png" style="display: block" width="208px; ">
</a>
</div>
.social-card-header{
position: relative;
display: -ms-flexbox;
display: flex;
-ms-flex-align: center;
align-items: center;
-ms-flex-pack: center;
justify-content: center;
height: 96px;
}
.social-card-header i {
font-size: 32px;
color:#FFF;
}
.bg-facebook {
background-color:#3b5998;
}
.text-facebook {
color:#3b5998;
}
.bg-google-plus{
background-color:#dd4b39;
}
.text-google-plus {
color:#dd4b39;
}
.bg-twitter {
background-color:#1da1f2;
}
.text-twitter {
color:#1da1f2;
}
.bg-pinterest {
background-color:#bd081c;
}
.text-pinterest {
color:#bd081c;
}
.share:hover {
text-decoration: none;
opacity: 0.8;
}
Also see: Tab Triggers