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.
<!-- Navbar -->
<div class= "navbar">
<a href="#cards">Spill History</a>
<a href="#content1">Environmental Effects</a>
<a href="#gallery">Restoration Methods</a>
<a href="#content2">Spill Cleanup</a>
</div>
<!-- Jumbotron -->
<div id="jumbotron"><img src=https://www.greenpeace.org/static/planet4-international-stateless/2020/09/5a4f7d68-gp1su9nb-1024x576.jpg> <h1>Oil Spills And Their Environmental Impact</h1></div>
<br class="Break">
<!-- cards -->
<div id="cards">
<div class= "card" id= "DeepwaterHorizon">
<div> <img src="https://cdn.britannica.com/59/139559-050-B9437E07/Debris-oil-rig-Deepwater-Horizon-April-22-2010.jpg" id="Image1" class="Images">
</div>
<h3>Deepwater Horizon, April 20, 2010</h3>
<p>
In 2010, oil was discovered under the gulf of mexico. A factory was put into place to collect the oil. On April 20, 2010, natural gas bursted a concrete core in the factory. This caused the worst oil spill in US history- the deepwater horizon spill. This oil spill did not only kill 11 workers, but injured 17.
</p>
</div>
<div class= "card" id= "ExxonValdez">
<div> <img src="https://cdn2.picryl.com/photo/1989/03/28/exxon-valdez-96f28d-1024.jpg" id="Image2"class="Images"> </div>
<h3>Exxon Valdez, March 24, 1989</h3>
<p>On March 24, 1989, an oil tanker (Exxon Valdes) hit a Reef. This boat was carrying roughly 54 million gallons of gas, 11 million of which were released into the ocean, making this one or the largest oil spills in US history. As shown in the image, hot water washing was one of the many techniques used to clean up after the Exxon Valdez Oil spill.</p>
</div>
<div class= "card" id= "ArgoMerchant">
<div><img src="https://live.staticflickr.com/4153/5182057658_145abc2db0_b.jpg" id="Image3"class="Images"></div>
<h3>Argo Merchant, December 16, 1976</h3>
<p>On December 16, 1976, a boat loaded with oil was heading for oregon to deliver a winter's supply of oil. The boat had two unqualified crew members, outdated maps, and a broken gyrocompass. The boat was unknowingly 24 miles off cource, and hit the ground in a 10 foot deep area. All crew members were evacuated and survived, however the next day the boat split in half and sank, releasing 7.7 million gallons of oil into the ocean.</p>
</div>
<div class= "card" id= "MegaBorg">
<div> <img src="https://live.staticflickr.com/4086/5181458317_9c3388d01d_b.jpg" id="Image4"class="Images"> </div>
<h3>Mega Borg, June 8, 1990</h3>
<p>On June 8, 1990, a boat named the "Mega Borg" suffered an explosion while moving oil to another boat. The mega borg was carrying almost 40 million galons of oil, but fortunatly, only 5.1 million got released. After the explosion, for the first time, coast gaurds released oil eating bacteria into the water to try and restore it.</p>
</div>
<div class= "card" id= "Westchester">
<div> <img src="https://cdn2.picryl.com/photo/2000/11/29/mv-westchester-oil-spill-9c3bf4-1024.jpg" id="Image5"class="Images"> </div>
<h3>Westchester, November 28, 2000</h3>
<p>
On tuesday, November 38, 2000, an 800 foot tanker lost power, and ran aground. The boat was carrying over 2.2 million gallons of nigerian crude oil, and spilt 567,000 gallons. This is equal to about 2/3 of an olympic sized swimming pool.
</p>
</div>
<div class= "card" id= "DamageAndCleanup">
<div> <img src="https://cdn2.picryl.com/photo/2010/06/22/cleanup-efforts-59384f-1600.jpg" id="Image6"class="Images"> </div>
<h3>Damage and Cleanup</h3>
<p>Oil spills can cause even more damage than letting oil into water and polluting it. Animals can be found plastered with oil. Juat try to imagine what that would be like for them! they are not able to get clean by themselves. They have to have people clean them up. While there is hardly anything we can do to prevent these spills in the first place, we can clean up after them. The image above shows the most common spill cleanup method. Becuase oil floats to the top of the water, and so do these borders, they can help block the oil from getting out further into the body of water.</p>
</div>
</div>
<div><a href="#jumbotron" class="BackToTop">Back To Top</a></div>
<br class="Break">
<!-- content2 -->
<div id="content1">
<h3>How do oil spills affect animals?</h3>
<div>
<p>
Oil spills can be incredibly damaging to animals. The pelicans shown in the image below were covered in oil during an oil spill. They had to be taken from their habitat to be cleaned. There are some programs such as
<a href= "https://www.birdrescue.org/">The International Bird Rescue Research Center</a>
that take birds, clean and take care of them for a little while, and when they are healthy again, they let them go. This can make a huge affect on the well-being of the birds who were affected during oil spills.
</p>
<img src="https://images.ctfassets.net/cnu0m8re1exe/6TXgm4tpQkP1me9mDnxYTo/b82e54ce12af5428321defb4c1be5f87/pelicans.jpg?fm=jpg&fl=progressive&w=660&h=433&fit=fill" class="Image">
<p>Birds are not the only animals affected by oil spills, but marine life too. The picture below shows a beautiful turtle covered in oil. It is horrible for just one animal to be covered in oil like this, but it is even more terrible that more than 6,165 sea turtles, 25,900 marine animals, and 82,000 birds are harmed, or killed from oil spills each year. The program named
<a href= "https://www.marinemammalcenter.org/">The Marine Mammal Center</a>
in San Francisco, California does basically the same thing that The International Bird Rescue Research Center does, but instead of finding birds, it finds marine animals in critical condition, takes them for awhile until they are better, and releases them back into the wild.</p>
<img src="https://live.staticflickr.com/5612/14929731544_c1717fb14a_b.jpg" class="Image">
</div>
</div>
<div><a href="#jumbotron" class="BackToTop">Back To Top</a></div>
<hr>
<!-- gallery -->
<div id="gallery">
<figure>
<div>
<img src= "https://www.marineinsight.com/wp-content/uploads/2021/04/oil-spill-boom-1.png.webp" class="Image" id="OilBoom">
</div>
<figcaption>Oil boom</figcaption>
</figure>
<figure>
<div>
<img src="https://cdn10.picryl.com/photo/2006/04/29/two-offshore-skimmer-vessels-tow-a-boom-floating-barrier-across-the-water-during-ebc898-1024.jpg" class="Image" id="Skimmer">
</div>
<figcaption>Skimmer</figcaption>
</figure>
<figure>
<div>
<img src="https://cdn2.picryl.com/photo/2010/07/10/in-situ-burn-ignition-79846b-1600.jpg" class="Image" id="BurningOil">
</div>
<figcaption>Burning the oil</figcaption>
</figure>
<figure>
<div>
<img src="https://live.staticflickr.com/2339/2269862567_0c8f435542_b.jpg" class="Image" id="UsingDispersants">
</div>
<figcaption>Using oil eating bacteria</figcaption>
</figure>
<figure>
<div>
<img src="https://live.staticflickr.com/1280/4701564499_ef590c855a_b.jpg" class="Image" id="ManuelLabor">
</div>
<figcaption>Manuel labor</figcaption>
</figure>
<figure>
<div>
<img src="https://response.restoration.noaa.gov/sites/default/files/images/13/cleanup-workers-high-pressure-hoses-exxon-valdez-oil-spill-trustee-council_356.jpg" class="Image" id="HotWaterWashing">
</div>
<figcaption id="6">Hot water Washing</figcaption>
</figure>
</div>
<div><a href="#jumbotron" class="BackToTop">Back To Top</a></div>
<br class="Break">
<!-- content1 -->
<div id="content2">
<h2>Cleanup Steps:</h2>
<p>Lets talk about the cleanup of an oil spill. As you read on the flash cards page, oil spills can be very damaging. It is important that we clean up after them as soon, and as quickly as possible. There are a few ways to clean up after them. The first being booms. Booms are sort of like pool noodles, they float on top of the water. if you put them around oil, it will keep it contained. Next is absorbents. Things such as grass and dirt are put into the water to soak up the oil. Skimmers are another good option, once the oil is contained in the booms, the skimmer picks it up. Another good option is burning in-situ. This is when you burn the oil. Water is not flammable, but oil is. So when you burn the oil, the fire will not spread, and the oil will be gone. While there are other choices to get oil from spills cleaned up, these are the most solid options. It is very important to clean up oil spills, and help maintain the environment as much as we can. </p>
<iframe width="734" height="413" src="https://www.youtube.com/embed/3DbSlAg3F3A" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
</div>
<div><a href="#jumbotron" class="BackToTop" id="EndButton">Back To Top</a></div>
/* global */
body{
margin: 0 auto;
background-color: lightblue;
position: absolute;
width: 100%;
color: white;
text-align: center;
font-family: sans-serif;
}
.Break{
margin: 80px;
}
hr {
border-color: #afafaf;
max-width: 930px;
}
.BackToTop{
position: static;
text-align: center;
margin: 20px;
font-size: 20px;
margin-left: 27px;
margin-bottom: 10px;
background-color: white;
padding: 6px;
border-radius: 14px;
color: #000055;
border: 1px solid black;
}
#EndButton{
position: absolute;
text-align: center;
margin: 20px;
font-size: 20px;
margin-left: -50px;
margin-bottom: 10px;
}
/* Navbar */
.navbar{
text-align: center;
background-color: hsla(0, 0%, 0%, 40%);
position: absolute;
width: 100vw;
}
.navbar > a {
color: white;
font-family: sans-serif;
margin: 15px 30px;
font-size: 22px;
display: inline-block;
}
@media (max-width: 680px){
.navbar > a{
margin: 5px 10px;
position: inline-block;
font-size: 19px
}
}
@media (max-width: 470px){
.navbar > a{
margin: 3px 7px;
position: inline-block;
font-size: 16px
}
}
@media (max-width: 390px){
.navbar > a{
margin: 3px 5px;
position: inline-block;
font-size: 14px
}
}
/* Jumbotron */
#jumbotron > img{
width: 100vw;
Height: 100vh;
object-fit: cover;
}
#jumbotron > h1 {
position: absolute;
top: 186px;
margin: 0 auto;
text-shadow: 4px 2px 0px black;
text-align: center;
font-size: 70px;
}
@media (max-width: 8000px){
#jumbotron > h1 {
font-size: 80px;
width: 900px;
text-align: center;
margin: 0 auto;
}
}
@media (max-width: 1000px){
#jumbotron > h1 {
font-size: 60px;
width: 900px;
text-align: center;
margin: 0px, 20px, 0px, 20px;
position: absolute;
}
}
@media (max-width: 900px){
#jumbotron > h1 {
font-size: 50px;
width: 800px;
text-align: center;
margin: 0 auto;
}
}
@media (max-width: 800px){
#jumbotron > h1 {
font-size: 50px;
width: 700px;
text-align: center;
margin: 0, 20, 0, 0;
text-align: center;
position: absolute
}
}
@media (max-width: 700px){
#jumbotron > h1 {
font-size: 30px;
width: 600px;
text-align: center;
margin: 0 auto;
}
}
@media (max-width: 600px){
#jumbotron > h1 {
font-size: 50px;
width: 500px;
text-align: center;
margin: 0 auto;
}
}
@media (max-width: 500px){
#jumbotron > h1 {
font-size: 40px;
width: 400px;
text-align: center;
margin: 0 auto;
}
}
@media (max-width: 400px){
#jumbotron > h1 {
font-size: 30px;
width: 300px;
text-align: center;
margin: 0 auto;
}
}
/* Cards */
#cards{
text-align: center;
max-width: 1024px;
margin: auto;
font-size: 17px;
}
.card > p{
margin: 10px 5px 5px 5px;
}
.card{
position: absoulte;
width: 300px;
height: 620px;
background-color: white;
border-radius: 15px;
box-shadow: 5px 5px 5px #444444;
margin: 10px;
text-align: center;
Overflow: hidden;
display: inline-block;
color: black;
font-size: 17px;
}
.card > h3{
text-align: center;
padding: 0px 0px 0px 10px
}
.Images{
height: 220px;
}
#Image1{
height: 225px;
}
#Image2{
height: 225px;
}
#Image3{
height: 225px;
}
#Image4{
height: 225px;
}
#Image5{
height: 225px;
}
#Image6{
height: 225px;
width: 330px
}
/* Content1 */
#content1{
max-width: 700px;
color: black;
text-align: center;
margin: 0 auto;
}
.Image{
width: 280px;
}
/* Gallery */
#gallery > figure > div > img{
width: 308px;
height: 220px;
object-fit: cover;
}
#gallery{
text-align: center;
max-width: 1200px;
margin: auto;
}
#gallery > figure{
background: #3ea1c3;
color: #000066;
Font-size: 27px;
display: inline-block;
margin: 10px;
}
@media (max-width: 660px) { #gallery > #gallery > figure > div > img {
width: 90vw;
height: 50vw;
}
}
/* content2 */
#content2 {
color: black;
}
#content2 > h1, h2, h3, h4, h5, h6 {
text-align: center;
}
#content2 > p{
max-width: 800px;
margin: 10px auto;
line-height: 24px;
}
#content2 > iframe {
display: block;
margin: 0 auto;
max-width: 80%;
}
Also see: Tab Triggers