Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

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.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

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.

+ add another resource

Packages

Add Packages

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.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<link href="https://fonts.googleapis.com/css?family=Slabo+27px" rel="stylesheet">

<div id="main">
  <div id="title">Albert Einstein</div>
  <div id="title2">The man who created the world's most famous equation</div>
  
  <div id="img-div">
    <img id="image" src="https://upload.wikimedia.org/wikipedia/commons/3/38/Einstein_Albert_Elsa_LOC_32096u.jpg" alt="Einstein with his wife">
    <div id="img-caption">Albert Einstein with his wife Elsa. Date not recorded. Fur collar from fox or skunks.</div>  
  </div>
  
  <div id="tribute-info">
    <p>Here is a timeline of Albert Einstein's life:</p>
    <ul>
          <li><b>1879</b> - Albert was born in Ulm, Germany. The family moved to Munich when Albert was one year old.</li>
          <li><b>1884</b> - The compass. When Albert was five he was given a compass by his father. He was fascinated by it and how it worked.</li>
          <li><b>1889</b> - He met Max Talmud. Max introduced Albert to math and science. Albert was ten years old.</li>
          <li><b>1894</b> - Albert finishes school. Albert finished his schooling in Munich with medical training. He moved to Milan with his family.</li>
          <li><b>1895</b> - Goes to school in Switzerland. Albert moved to Switzerland at 16 years old to attend Aarau Cantonal School.</li>
          <li><b>1896</b> - Top of the class. Albert graduates at the top of his class. He was a year younger than the other students.</li>
          <li><b>1901</b> - Hard times. Albert slacked off in further schooling, even after doing so well. Because of this he had a hard time finding a good job.</li>
          <li><b>1902</b> - The patent office. Albert Einstein got a job in the patent office. He used his understanding of math and science in his new position, and it made him happy.</li>
          <li><b>1905</b> - 	Submits his first paper. Einstein submitted his first paper on his theory of thermodynamics. It was the first of many.</li>
          <li><b>1909</b> - 	A new job. After working at the patent office and writing his theories, Einstein got a job teaching theoretical physics at the University of Zurich.</li>
          <li><b>1911</b> - Attends physics conference. He was given an invitation to the first-ever world physics conference. He was the youngest physicist there.</li>
          <li><b>1913</b> - Theory of gravity. He believed science's understanding of gravity was wrong, and he worked on a new theory which he would later test with a solar eclipse.</li>
          <li><b>1919</b> - 	Einstein is famous. After publishing his Theory of Relativity and correctly predicting the effects of a solar eclipse, Einstein's name went around the world.</li>
          <li><b>1922</b> - Nobel Prize. Einstein was awarded his first Nobel Prize. He was on his way to Japan when he got the news.</li>
          <li><b>1933</b> - America. He visited America for the first time because he feared the rising Nazi party in Germany.</li>
          <li><b>1945</b> - War ends. World War II ended and Einstein continued his research. He made advances in heat, gravity, and relativity, and he published over 300 scientific reports.</li>
          <li><b>1955</b> - Einstein dies. Albert Einstein died in April of heart failure.</li>
        </ul>
    <p1>If you have time, you should read more about this incredible human being on his <a id="tribute-link" href="https://en.wikipedia.org/wiki/Albert_Einstein" target="_blank"> Wikipedia entry</a>.</p1>
  </div>
  
</div>
  

              
            
!

CSS

              
                #main {
  display: grid;
  background-color: lightgrey;
  width: 10in;
  max-width: 100%;
  position: relative;
  margin:auto;
  top: 10px;
  bottom: 10px;
  border-style: solid;
  border-color: grey;
  border-width: 2px;
  border-radius: 10px;
  padding: 10px 0px 10px 0px
}
#title {
  text-align: center;
  font-size: 48px;
  font-family: Slabo;
  font-weight: bold;
  padding-bottom: 20px;
}
#title2 {
  text-align: center;
  font-size: 28px;
}
#img-div {
  display: grid;
  padding: 10px 10px 20px 10px;
  background-color: white;
  margin: 10px 10px 10px 10px;
  text-align: center;
  }
#image {
  position: relative;
  max-width: 100%;
}
#img-caption {
  font-family: sans-serif;
  font-weight: bold;
}
#tribute-info {
  position: relative;
  width: 80%;
  left: 10%;
  font-family: sans-serif;
  font-size: 16px; 
}
p {
  font-size: 24px;
  font-weight: bold;
}
p1 {
  font-size: 24px;
}
li {
  margin: 10px 0px 20px 0px;
}

              
            
!

JS

              
                // !! 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. 

              
            
!
999px

Console