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.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Life and Career of Abraham Lincoln</title>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<link href="https://fonts.googleapis.com/css?family=Yanone Kaffeesatz" rel="stylesheet" type="text/css">
</head>
<body>
<main id="main">
<h2 id="title"> Abraham Lincoln</h2>
<figure id="img-div">
<img id="image" src="https://www.dropbox.com/s/66yjvyf7nehuup7/abraham.jpg?raw=1" alt="Abraham Lincoln" />
<figcaption id="img-caption">16th President of the United States</figcaption>
</figure>
<div>
<h4>
A timeline of the life and career of Abraham Lincoln</h4>
<div id="tribute-info">
<section class="d1">1809</section>
<section class="d2">
On February 12, Abraham Lincoln was born in a one-room log cabin at Sinking Spring Farm near Hodgenville, Kentucky. He was the second child born to Thomas Lincoln and Nancy (Hanks) Lincoln. This became known as "Lincoln Day."
</section>
<section class="d1">1811 </section>
<section class="d2">In spring, the Lincoln family moves to the 230-acre Knob Creek Farm 10 miles from Sinking Spring.</section>
<section class="d1">1816 </section>
<section class="d2">In December, The Lincoln family moved across the Ohio River to Little Pigeon Creek near present-day Gentryville, Indiana.</section>
<section class="d1">1818 </section>
<section class="d2">On October 5, Lincoln’s mother, Nancy Hanks Lincoln died of "milk sickness". She was one among several in the settlement who had died of same illness. </section>
<section class="d1">1819</section>
<section class="d2">On December 2, Thomas Lincoln married Sarah "Sally" Bush Johnston, a widow from Elizabethtown, Kentucky, with three children of her own. </section>
<section class="d1">1831</section>
<section class="d2"> Lincoln started working for himsel. His work included: boat building, sailing, carpentry, hog sticking, sawmilling, and logging. He also began studying the law. He re-enlisted in the Black Hawk War.
</section>
<section class="d1">1832</section>
<section class="d2">In April, The Black Hawk War breaks out and Lincoln forms the 31st Regiment of the Illinois Militia with his neighbors, who elect him as captain. His company is mustered out of service at the end of May and he enlists in another regiment for 20
days, then joins Captain Jacob M. Early’s spy company from mid-June to July 10, when the company musters out. (In that era, "spy" was what is called "scout" today, and a scout back then was a spy.) Lincoln saw no military action during his months
of service but does accompany a detail to retrieve and bury the bodies of several militiamen killed in a skirmish.</section>
<section class="d1">1842</section>
<section class="d2">
Lincoln and Mary Todd marry on November 4. They live at the Globe Tavern in Springfield.
</section>
<section class="d1">1843</section>
<section class="d2"> On August 1, Mary gives birth to Robert Todd Lincoln, who is named in honor of Mary’s father. Late in the year they move to a rented cottage.</section>
<section class="d1">1844</section>
<section class="d2">in May, the Lincolns move into a house in Springfield, bought for $1,500. Lincoln campaigns for Henry Clay in the presidential election. In December, he dissolves his law partnership with Logan, then sets up his own practice, accepting William
Herndon as his partner.
</section>
<section class="d1">1846</section>
<section class="d2">
On March 10, Mary gives birth to their second son, Edward "Eddie" Baker Lincoln. On May 1, Lincoln is nominated to be the Whig candidate for U.S. Congress—he is elected on August 3.
</section>
<section class="d1">1847</section>
<section class="d2">
U.S. Representative Lincoln moves into a boarding house in Washington, D.C., with his wife and two sons. On December 6, he takes his seat in the House of Representatives.
</section>
<section class="d1">1850</section>
<section class="d2">
on February 1, Edward Lincoln dies a month before his fourth birthday, of what was thought to be diphtheria but which may have been tuberculosis. Lincoln resumes his travels in the 8th Judicial Circuit.
<section class="d1"></section>
On December 21, Mary give birth to another son, William "Willie" Wallace Lincoln, named for the husband of her sister Frances.
</section>
<section class="d1">1853 </section>
<section class="d2">
On April 4, Thomas "Tad" Lincoln is born.
</section>
<section class="d1">1861</section>
<section class="d2">
On March 4, Lincoln is elected as the 16th President of the United StatesCivil War began on April 12th.
</section>
<section class="d1">1862</section>
<section class="d2">
On February 20, William Lincoln dies at age 11 of typhus. Mary Todd Lincoln is devastated and, some say, never fully recovers.
</section>
<section class="d1"> </section>
<section class="d2">
on April 16, Lincoln signs an act that abolishes slavery in the District of Columbia.
<section class="d1"></section>
On May 20, Lincoln approves the Federal Homestead Law.
<section class="d1"></section>
On September 17, General Robert E. Lee and the Confederate armies are stopped at the Battle of Antietam in Maryland, the bloodiest day in U.S. history.
<section class="d1"></section>
On September 22, the President issues the preliminary Emancipation Proclamation.
<section class="d1"></section>
December 31, the President signs a bill admitting West Virginia to the Union as the 35th state.
</section>
<section class="d1">1863 </section>
<section class="d2">
On January 1, President Lincoln issues the final Emancipation Proclamation freeing all slaves in territories held by Confederates.
<section class="d1"></section>On July 3, the Battle of Gettysburg ends—the Confederate defeat is a turning point of the war.
<section class="d1"></section>On July 4, Vicksburg, Mississippi, capitulates to the army of Ulysses S. Grant.
<section class="d1"></section>
On November 19, Lincoln delivers the Gettysburg Address at a ceremony dedicating the battlefield as a National Cemetery. Though not well received at the time, it will take its place among the most famous speeches in history.
</section>
<section class="d1">1864 </section>
<section class="d2">
On March 12, Lincoln appoints Ulysses S. Grant as General-in-Chief of all the Federal armies. William T. Sherman succeeds Grant as Commander in the West.
<section class="d1"></section>
On June 8, Lincoln is nominated for a second term as President. On July 11–12, Fort Stevens on the outskirts of Washington, D.C., is unsuccessfully attacked by a Confederate force under Lieutenant General Jubal A. Early. Lincoln and Mary watch the battle
from the fort.
<section class="d1"></section>
On September 2, Sherman’s army captures Atlanta and in November the President, on advice from Grant, approves Sherman’s "March to the Sea."
<section class="d1"></section>
On November 8, Lincoln is re-elected, defeating Democrat George B. McClellan—Lincoln gets 212 of 233 electoral votes and 55 percent of the popular vote.
<section class="d1"></section>
December 20, Sherman reaches Savannah, Georgia, leaving a path of destruction 60 miles wide all the way from Atlanta.
</section>
<section class="d1">1865 </section>
<section class="d2">On March 4, the inauguration ceremonies are held in Washington, D.C. and President Lincoln delivers his Second Inaugural Address.
<section class="d1"></section>
On April 9, General Robert E. Lee surrenders his Confederate Army to General Ulysses S. Grant following the Battle of Appomattox Court House in Virginia. The following day, celebrations break out in Washington.
<section class="d1"></section>
On April 11, Lincoln makes his last public speech, which focuses on the problems of reconstruction.
<section class="d1"></section>
On April 14, Lincoln and his wife, Mary, see the play Our American Cousin at Ford’s Theater. About 10:13 p.m., during the third act of the play, John Wilkes Booth shoots the 56-year old president in the head. Doctors attend to the president in the theater
then move him to a house across the street. He never regains consciousness and dies at 7:22 the following the morning.
<section class="d1"></section>
On April 19, Lincoln’s funeral procession proceeds down Pennsylvania Avenue.
<section class="d1"></section>On April 21, a nine-car funeral train with 300 dignitaries begins the journey from Washington, D.C.. to Springfield, Illinois.
<section class="d1"></section>
On April 26, John Wilkes Booth is shot and killed in a tobacco barn in Virginia.
<section class="d1"></section>
On May 4, Lincoln is laid to rest in Oak Ridge Cemetery, outside Springfield, Illinois.
<section class="d1"></section>
On December 6, the Thirteenth Amendment to the United States Constitution, passed by Congress on January 31, 1865, is finally ratified and slavery is abolished.
</section>
<section class="d1">1897 </section>
<section class="d2">
Abraham Lincoln Memorial University is established at Harrowgate in East Tennessee to honor the late president.
</section>
<section class="d1">1909 </section>
<section class="d2">
In honor of the centennial of Lincoln’s birth, his image is placed on the one-cent piece.
</section>
<section class="d1">1914 </section>
<section class="d2">
Lincoln’s face is placed on the first five-dollar Federal Reserve Bank Note.
</section>
<section class="d1">1922 </section>
<section class="d2">
On May 30, President Warren G. Harding officially dedicates the Lincoln Memorial in Washington, D.C.
</section>
</div>
<a href="https://en.wikipedia.org/wiki/Abraham_Lincoln" id="tribute-link" target="_blank">
READ MORE ON WIKIPEDIA
</a>
</div>
</main>
</body>
</html>
body {
font-family: "Times New Roman", Times, serif;
font-size: 20px;
text-align: center;
/*color: #333;*/
margin: 0;
background: #f0edd4;
}
#main {
margin: 10px;
background: #f0edd4;
}
h2 {
font-size: 4rem;
margin: 20px;
font-weight: normal;
}
@media (max-width: 460px) {
h2 {
font-size: 1.2rem;
line-height: 1.2;
}
#img-caption {
font-size: 1rem;
}
}
#image {
max-width: 100%;
display: block;
}
#img-div {
background: #100701; /*#f0e695;*/
padding: 10px;
margin: 0;
}
#img-caption {
margin-top: 8px;
color: #d9bb13;
}
h4 {
font-size: 1.6rem;
margin: 20px;
font-weight: normal;
}
@media (max-width: 460px) {
h4 {
font-size: 1.2rem;
line-height: 1.2;
}
}
#tribute-info {
font-size: 1rem;
line-height: 1.6rem;
/* text-align: left;
font-family: "Times New Roman", Times, serif;*/
width: 60%;
/*background: LightGray;*/
margin: auto;
display: grid;
grid-template-columns: 1fr 8fr;
grid-gap: 8px;
padding: 16px;
}
@media (max-width: 460px) {
#tribute-info {
width: 80%;
}
}
.d1 {
font-weight: bold;
}
.d2 {
text-align: justify;
}
a {
color: #276faa;
}
#tribute-link:hover {
color: #0688f2;
}
a:visited {
color: #477ca7;
}
// !! IMPORTANT README:
// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place.
/***********
INSTRUCTIONS:
- Select the project you would
like to complete from the dropdown
menu.
- Click the "RUN TESTS" button to
run the tests against the blank
pen.
- Click the "TESTS" button to see
the individual test cases.
(should all be failing at first)
- Start coding! As you fulfill each
test case, you will see them go
from red to green.
- As you start to build out your
project, when tests are failing,
you should get helpful errors
along the way!
************/
// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!
// Once you have read the above messages, you can delete all comments.
Also see: Tab Triggers