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.
<body>
<header class="yellow-row">
<h1>Grace Murray Hopper</h1>
<h2>“Amazing Grace”</h2>
</header>
<aside>
<figure>
<img src="http://images.computerhistory.org/timeline/timeline_sw.languages_1952.hopper.jpg" alt="Grace Hopper at a Remington-Rand Univac computer" width="800" height="998">
<figcaption class="reference">Image courtesy of <a href="http://www.computerhistory.org/" target="_blank">Computer History Museum</a>.</figcaption>
</figure>
<section>
<p>“Humans are allergic to change. They love to say, "We've always done it this way." I try to fight that. That's why I have a clock on my wall that runs counter-clockwise.” - Grace M. Hopper</p>
<p class="quote-reference">From "The Wit and Wisdom of Grace Hopper" by Philip Schieber in OCLC Newsletter, No. 167 (March/April 1987)</p>
</section>
</aside>
<main>
<h3 class="yellow-row">Time line of Grace Murray Hopper</h3>
<div id="timeline">
<ul>
<li><strong>1906</strong> - Born on December 9, in New York City, New York</li>
<li><strong>1928</strong> - Graduated from Vassar College with a bachelor's degree in mathematics and physics</li>
<li><strong>1930</strong> - Earned her master's degree at Yale University</li>
<li><strong>1931</strong> - Joined Vassar College to teach mathematics</li>
<li><strong>1934</strong> - Earned a Ph.D. in mathematics from Yale</li>
<li><strong>1941</strong> - Promoted to associate professor at Vassar College</li>
<li><strong>1943</strong> - Joined the U.S. Navy Reserve</li>
<li><strong>1944</strong> - Graduated first of her class and was assigned to the Bureau of Ships Computation Project at Harvard University</li>
<li><strong>1947</strong> - First computer “bug” case. While testing the Mark II Aiken Relay Calculator at Harvard, a moth was found stuck at a relay. The moth was removed and taped to the computer log with the entry “First actual case of bug being found.” From then on, the term “debugging” was used.</li>
<li><strong>1949</strong> - Started working at the Eckert–Mauchly Computer Corporation as a senior mathematician and joined the team developing the UNIVAC I</li>
<li><strong>1952</strong> - Published her first paper on compilers and built her first compiler</li>
<li><strong>1954</strong> - Promoted director of automatic programming. Some of the first compiler-based programming languages, including MATH-MATIC and FLOW-MATIC, were released under her direction.</li>
<li><strong>1959</strong> - Served as a technical consultant with many of her former employees to the committee that defined the new language COBOL (COmmon Business-Oriented Language) during the Conference on Data Systems Languages (CODASYL)</li>
<li><strong>1966</strong> - Retired from the Naval Reserve with the rank of Commander</li>
<li><strong>1967</strong> - Recalled to active duty and served as the director of the Navy Programming Languages Group in the Navy's Office of Information Systems Planning. Developed validation software for COBOL and its compiler as part of a COBOL standardization program for the entire Navy.</li>
<li><strong>1969</strong> - Awarded, the first ever, Computer Science Man of the Year award (now called the Distinguished Information Sciences Award) from the Data Processing Management Association</li>
<li><strong>1971</strong> - Retired again from the Navy</li>
<li><strong>1972</strong> - Recalled again to active duty</li>
<li><strong>1973</strong> - Promoted to the rank of Captain</li>
<li><strong>1983</strong> - Promoted to the rank of Commodore by special Presidential appointment (the rank of Commodore was later renamed Rear Admiral) </li>
<li><strong>1986</strong> - Retired from the Navy and received the Defense Distinguished Service Medal, the highest non-combat decoration awarded by the Department of Defense. Became a senior consultant at the Digital Equipment Corporation.</li>
<li><strong>1992</strong> - Died peacefully in her sleep of natural causes</li>
<li><strong>2016</strong> - Awarded the Presidential Medal of Freedom for her accomplishments in the field of computer science by Barack Obama</li>
</ul>
<p class="reference"> Source: <a class="url-link" href="https://en.wikipedia.org/wiki/Grace_Hopper" target="_blank">https://en.wikipedia.org/wiki/Grace_Hopper</a></p>
</div>
</main>
<footer class="yellow-row reference">
<p><a href="https://www.freecodecamp.com" target="_blank">FreeCodeCamp</a> Project: Build a Tribute Page</p>
<p>Created by <a href="https://www.linkedin.com/in/c%C3%A9cile-bertin-0898743b" target="_blank">Cecile Bertin</a></p>
</footer>
</body>
* {
box-sizing: border-box;
}
body{
margin: 0;
margin-top: 7vw;
background-color: #808080;
font-family: courier, "Lucida Console";
color: #FFA500;
font-size: calc(12px + 0.5vw);
line-height: 1.3;
display: flex;
flex-direction: column;
}
.yellow-row{
padding: calc(5px + 3vw) 5vw;
color: #696969;
background-color: #FFA500;
text-align: center;
box-shadow: 0 4px 8px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.15), 0 -4px 8px rgba(0,0,0,0.10), 0 -2px 6px rgba(0,0,0,0.15);
}
h1, h2, h3{
margin: 0;
}
h1{
font-weight: bold;
font-size: calc(12px + 5vw);
}
h2{
font-style: italic;
font-weight: normal;
font-size: calc(10px + 4vw);
}
aside{
display: flex;
flex-direction: column;
margin-bottom: 1vw;
}
figure, section{
margin:0;
width: 100vw;
}
img {
display: block;
width: 90vw;
height: 112.275vw;
margin: 5vw;
margin-bottom:0;
}
section{
padding: 0 6vw;
}
h3{
font-weight: bold;
font-size: calc(10px + 2vw);
}
ul{
padding: 1vw;
}
.quote-reference{
font-size: calc(10px + 0.5vw);
padding-left: calc(20px + 0.5vw);
font-style: italic;
}
a:link, a:visited, a:hover, a:active{
color: #F5F5F5;
}
.reference{
text-align: center;
font-size: calc(10px + 0.5vw);
padding: 1vw 1vw;
}
.url-link{
word-break: break-all;
}
#timeline{
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
height: 67vh;
padding: 2vw 3vw 2vw 7vw;
}
@media screen and (min-width: 500px){
aside{
flex-direction: row;
}
section, figure{
width: 50vw;
}
section{
margin: auto;
padding-left:0;
}
img{
width: 40vw;
height: 49.9vw;
}
}
Also see: Tab Triggers