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.
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<main id="main">
<h1 id="title">Larry page</h1>
<p id="title">Co founder of Google</p>
</br>
<figure id="img-div">
<img id="image" src="https://i.insider.com/56c480e82e526553008b7a25?width=1100&format=jpeg&auto=webp" alt="larry" >
<figcaption id="img-caption">
<p>Larry page at a Google event</p>
</figcaption>
</figure>
</br>
<div id ="quote">
<cite id="quotebylar">"If you're changing the world, you're working on important things. You're excited to get up in the morning."- Larry page</cite>
</div>
</br>
</br>
<div id = "tribute-info">
<blockquote>
<h2 id= "title2">Quick Facts</h2>
<hr>
<ul id= "facts" style="list-style-type:none;">
<li>Born in East lansing, Michigan March 26, 1973</li>
<li>Went to Stanford University, University of Michigan to study computer engineering</li>
<li>Google is a play on the word googol, the term for the numeral one followed by 100 zeroes</li>
</ul>
</div>
</br>
<div id= "wholarry" >
<h3 class= "moreinfo">Who was Larry Page?</h3>
<hr>
<p class= "moreinfo">Born in Michigan in 1973, Larry Page's parents were both computer experts. Following in their footsteps, he studied computer engineering at Stanford University, where he met Sergey Brin. The duo developed a search engine that listed results according to the popularity of the pages and, with Page as CEO, Google became the world's most popular search engine after launching in 1998. Page and Brin later took charge of Google's new parent company, Alphabet, until stepping down from their everyday roles in late 2019.</p>
</div>
</br>
<div id = "timeline">
<blockquote>
<h4 id = "i2">Timeline of Larry Page's life</h4>
<hr>
<blockquote>
<p><strong>1995 -</strong> Meets the great Sergey Brin at Stanford University</p>
<p><strong>1998 - </strong>Co-finds Google with partner Sergey Brin</p>
<p><strong>1998-2001 - </strong> Launches Google and becomes the CEO of Google</p>
<p><strong>2001-2011 - </strong> Becomes the president of products at Google</p>
<p><strong>2011-2015 - </strong> Google announces a corporate restructuring, forming an umbrella company called Alphabet and naming Sundar Pichai as the new CEO to the core business of Google. Page will serve as Alphabet's CEO and Sergey Brin will serve as president</p>
<p><strong>October 5th 2015 -</strong> Becomes CEO of Alphabet</p>
<p><strong>June 2016 - </strong>Page has secretly invested more than $100 million of his own money to fund two flying car companies, Kitty Hawk and Zee.Aero</p>
<p><strong>December 2019 - </strong>Alphabet announces that Page and Brin are stepping down as CEO and president, respectively. The co-founders will continue to serve on Alphabet's board of directors</p>
</blockquote>
</div>
</br>
<p id="link" >To find out more about Larry's long life achievements click on this <a id ="tribute-link"href="https://edition.cnn.com/2013/04/08/us/larry-page-fast-facts/index.html" target= "_blank">link</a>
</main>
body{
background-color: #C0C0C0;
}
#title{
text-align: center;
font-family: arial;
font-size: 2em;
color: grey;
background-color: white;
border-radius: 20px;
box-shadow: 0px 0px 5px 0px grey;
padding: 20px;
}
}
}
#img-caption{
text-align: center;
}
#img-div{
background-color: white;
border-radius: 30px;
box-shadow: 0px 0px 5px 0px grey;
margin-left: 300px;
margin-right: 300px;
text-align:center;
font-family: arial, sans-serif;
color: grey;
padding: 10px;
max-width: auto;
}
#image{
max-width: 100%;
height: auto;
border-radius: 20px;
margin-left: auto;
margin-right: auto;
display: block;
}
#quotebylar {
text-align: center;
font-family: arial;
color: grey;
font-size: 1em;
}
#quote {
margin: auto;
width: 40%;
background-color: white;
border-radius: 20px;
box-shadow: 0px 0px 5px 0px grey;
padding: 20px;
}
#tribute-info{
background-color: white;
font-family: arial, sans-serif;
border-radius: 20px;
box-shadow: 0px 0px 5px 0px grey;
padding: 10px;
text-align: center;
color:grey;
}
#facts{
color: #grey;
line-height: 50px;
}
#wholarry{
background-color: white;
text-align:left;
border-radius: 20px;
padding: 10px;
box-shadow: 0px 0px 5px 0px grey;
}
.moreinfo{
font-family: arial, sans-serif;
color:grey;
text-align: center;
}
#timeline{
background-color: white;
text-align: left;
border-radius: 20px;
padding: 10px;
box-shadow: 0px 0px 5px 0px grey;
font-family: arial, sans-serif;
color: grey;
}
#i2{
text-align: center;
}
#link{
font-family: arial, sans-serif;
color: white;
text-align: center;
}
a:hover{
color: grey;
font-size: 30px;
}
@media (max-width:600px){
#img-div{
margin-right: 50px;
margin-left: 50px;
}
}
@media (max-width:600px){
#quotebylar{
margin-right: 30px;
margin-left: 30px;
}
}
Also see: Tab Triggers