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.
<div class="grid">
<div class="card">
<div class="text text-gradient-001">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-002">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-003">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-004">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-005">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-006">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-007">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-008">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-009">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-010">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-011">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-012">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-013">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-014">Text Gradient</div>
</div>
<div class="card">
<div class="text text-gradient-015">Text Gradient</div>
</div>
</div>
body {
width: 100%;
height: 100%;
min-height: 100vh;
padding:0;
margin:0 auto;
background: linear-gradient(to bottom, #0a0a0a, #202020 100%);
background-size: cover;
background-repeat: no-repeat;
}
.text{
font-size:36px;
font-weight:600;
font-family: 'Poppins', sans-serif;
color:#f0f0f0;
}
.card{
padding: 36px 0;
text-align: center;
border: 1px dashed rgba(255, 255, 255, .15);
border-radius: 20px;
background: linear-gradient(180deg, black, transparent);
}
.grid{
width: 90%;
display: grid;
grid-template-columns: repeat(1, minmax(0, 1fr));
gap: 20px;
max-width: 1280px;
margin: 5% auto 10%;
}
@media (min-width:576px) {
.grid{
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (min-width:767px) {
.grid{
gap: 20px;
grid-template-columns: repeat(3, minmax(0, 1fr));
}
}
/** Text Gradient 001 */
/** Text Gradient 001 - Autumn Sunset */
.text-gradient-001 {
color: #c08175;
background-image: linear-gradient(45deg, #c08175, #2bdc66 33%, #c8abbc 67%, #e8e4af 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 002 - Cool Blue */
.text-gradient-002 {
color: #FFD9EE;
background-image: linear-gradient(135deg, #FFD9EE, #4543DE 50%, #6ad3b2 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 003 - Emerald Fire */
.text-gradient-003 {
color: #138f5f;
background-image: linear-gradient(135deg, #138f5f, #2aacb4 50%, #e01e38 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 004 - Neon Future */
.text-gradient-004 {
color: #ff2a6d;
background-image: linear-gradient(90deg, #ff2a6d, #05d9e8 60%, #a072ff);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 005 - Golden Hour */
.text-gradient-005 {
color: #ff7e5f;
background-image: linear-gradient(120deg, #ff7e5f, #f9b16e 40%, #ffdb3a 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 006 - Midnight Forest */
.text-gradient-006 {
color: #0f3443;
background-image: linear-gradient(to right, #0f3443, #34e89e 50%, #1d2671 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 007 - Candy Pop */
.text-gradient-007 {
color: #fc00ff;
background-image: linear-gradient(45deg, #fc00ff, #ffea00 50%, #00ff8c);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 008 */
.text-gradient-008 {
color: #3d5c53;
background-image: linear-gradient(180deg, #3d5c53 , #da8259 33%, #2b8187 67%, #b1f2a9 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 009 */
.text-gradient-009 {
color: #7df28d;
background-image: linear-gradient(135deg, #7df28d , #ed88dd 50%, #96b4b5 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 010 */
.text-gradient-010 {
color: #d4fd88;
background-image: linear-gradient(135deg, #d4fd88 , #ecee05 33%, #bea3e1 67%, #3b3f91 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 011 */
.text-gradient-011 {
color: #f8aa7e;
background-image: linear-gradient(180deg, #f8aa7e , #7292e8 33%, #255df5 67%, #dba518 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 012 */
.text-gradient-012 {
color: #98e41d;
background-image: linear-gradient(135deg, #98e41d , #dee6dc 33%, #95cba6 67%, #96d5b6 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 013 */
.text-gradient-013 {
color: #FFFFFF;
background-image: linear-gradient(180deg, #FFFFFF , #E6E6E6 50%, #404040 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 014 */
.text-gradient-014 {
color: #fe8675;
background-image: linear-gradient(180deg, #fe8675 , #9f851b 33%, #67c6b5 67%, #b92b91 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
/** Text Gradient 015 */
.text-gradient-015 {
color: #8152b5;
background-image: linear-gradient(180deg, #8152b5 , #9f2e76 33%, #dd97f4 67%, #6a87f6 100%);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
Also see: Tab Triggers