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>
<head>
<style> h1{
font-family:fantasy;
}
h1{
color: pink;
}
h2{
font-:sans-serif
}
h1{
font-style: italic
font-weight: 700;
font-size: 100px;
font: italic
}
h2{
color: black;
}
.paragraph{
height: 200px;
border: 10px;
width: 350px;
overflow: auto;}
.silver-frame {
border: 10px groove rgb(204, 204, 204);
}
.gold-frame {
border: 10px ridge rgb(255, 183, 0);
}
body {
background-image: url("https://images.thdstatic.com/productImages/5e763923-4c7e-42b7-919e-1f9a6262aa9f/svn/arthouse-wallpaper-rolls-692205-64_400.jpg");
background-repeat: no-repeat;
background-size: cover;
}
p{
background-color: rgba(255, 255, 255, .7);
}
</style>
</head>
<body>
<h1 class="save the turtles"> Save The Turtles</h1>
<img class="gold-frame" src= "https://i.pinimg.com/originals/3a/60/f1/3a60f115c3a5b2be91ea471c5dfcade9.jpg" width=400px>
<h2>Information</h2>
<p> Save the Turtles is a grassroots, all-volunteer non-profit that has been saving endangered sea turtles since 2001. Nearly all monies raised goes to direct protection of sea turtles. Your donation also goes a long way to support a sustainable community based on sea turtle conservation.</p>
<h2> Think About The Environment </h2>
<p>Think about what your doing before you do it. When you have trash, think about what will happen if you don't put it in the trash. Right! It can damage the turtles. Sharp plastics can rupture internal organs and bags can cause intestinal blockages leaving turtles unable to feed, resulting in starvation. Even if they survive, consuming plastic can make turtles unnaturally buoyant, which can stunt their growth and lead to slow reproduction rates.</p>
<img class="silver-frame" src="https://image.shutterstock.com/image-vector/littering-behavior-infographic-correct-wrong-260nw-1834834384.jpg">
<h2> Save The Turtles </h2>
<p> You can help save the turtles by not littering your trash. sometimrs, especcially on a beach day, your trash can float in the ocean which goes deeper that causes the turtles to get damaged. Another way to help: If you see some trash on the ground try to keep it in the trash can. That's what trashcans and garbage bags were made for. Here are some things you can do to help save the turtles.
<ol>
<li> Reduce marine debris that may entangle or be accidentally eaten by sea turtles.</li
<li> Try to use more reusable itmes than disposable so you can save money and help the environment at the same time. </li>
<div>
<p class="paragraph"> Poachers come in the cover of night to rob her eggs. Sometimes they come for her meat, killing all turtles on a beach; sometimes they take them alive on cruel journeys to be sold on the black market.
The nesting process takes hours. A sea turtle must dig a hole 2 to 5 feet deep to deposit her eggs. Afterwards, she must carefully fill and camouflage the hole – her last attempt to protect the offspring she must leave behind.
Sea Turtle Patrollers make the difference. Patrolling is a direct protection, boots-on-the-ground job.
It’s difficult—sometimes dangerous—but a highly effective conservation tool. Countless sea turtles and habitats exist today that would not without community-based patrollers. They walk the beach through the night, often in tropical downpours. When they find a nesting turtle, they sit with her, protecting her until she returns to the ocean and safeguarding her eggs thereafter. When the hatchlings emerge, patrollers protect them on their first journey to the ocean.</p></div>
Learn more about saving and taking care of the turtles
<a href="https://saveturtles.org/">SaveTurtles</a>
</body>
</html>
Also see: Tab Triggers