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>

<main id="main">
  <h1 id="title"> Albert Einstein </h1>
  <img src="https://i.postimg.cc/d3jgBbpT/atom-1.png" alt="atom" id="atom">
    <p id="tribute-info">Meet the father of modern physics</p>
  <figure id="img-div">
  <img src="https://i.postimg.cc/BZ1j89Mh/albert-einstein-2462402.jpg" alt="Albert Einstein" id="image">
    <figcaption id="img-caption">Einstein-colored photo</figcaption   
  </figure>
 <body>
   <div>
     <p id="main-text">Albert Einstein was a German-born theoretical physicist who developed the theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics). His work is also known for its influence on the philosophy of science. He is best known to the general public for his mass–energy equivalence formula E = mc2, which has been dubbed "the world's most famous equation". He received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect", a pivotal step in the development of quantum theory.<br>

The son of a salesman who later operated an electrochemical factory, Einstein was born in the German Empire, but moved to Switzerland in 1895, forsaking his German citizenship the following year. Specializing in physics and mathematics, he received his academic teaching diploma from the Swiss Federal Polytechnic School in Zürich in 1900. The following year, he acquired Swiss citizenship, which he kept for his entire life. After initially struggling to find work, from 1902 to 1909 he was employed as a patent examiner at the Swiss Patent Office in Bern.<br>

Near the beginning of his career, Einstein thought that the laws of classical mechanics could no longer be reconciled with those of the electromagnetic field. This led him to develop his special theory of relativity during his time as a patent clerk.<br> In 1905, called his annus mirabilis ('miracle year'), he published four groundbreaking papers which attracted the attention of the academic world; the first paper outlined the theory of the photoelectric effect, the second explained Brownian motion, the third introduced special relativity, and the fourth mass–energy equivalence. That year, at the age of 26, he was awarded a PhD by the University of Zurich.<br>

Although initially treated with skepticism from many in the scientific community, Einstein's works gradually came to be recognised as significant advancements. He was invited to teach theoretical physics at the University of Bern in 1908 and the following year moved to the University of Zurich, then in 1911 to Charles University in Prague before returning to ETH (the newly renamed Federal Polytechnic School) in Zürich in 1912.<br> In 1914, he was elected to the Prussian Academy of Sciences in Berlin, where he remained for 19 years. Soon after publishing his work on special relativity, Einstein began working to extend the theory to gravitational fields; he then published a paper on general relativity in 1916, introducing his theory of gravitation. He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules.<br> He also investigated the thermal properties of light and the quantum theory of radiation, the basis of the laser, which laid the foundation of the photon theory of light. In 1917, he applied the general theory of relativity to model the structure of the universe.</p>
   </div>

   <div class="caixa">  <h2>Timeline</h2>
      <ul>
        <li><strong>1879: </strong>Albert Einstein is born in Ulm, Germany, the first child of Hermann and Pauline Einstein.</li>
        <li><strong>1880: </strong>The Einstein family moves to Munich, Germany.</li>
        <li><strong>1888: </strong>Einstein is accepted at the Luitpold Gymnasium</li>
        <li><strong>1889: </strong>The medical student Max Talmud begins joining the Einstein family regularly for dinner and introduces Albert to scientific and philosophical writings.</li>
        <li><strong>1894: </strong>The Einstein family moves to Milan, Italy, but Einstein remains in Munich to complete his education at the Gymnasium.</li>
        <li><strong>1896: </strong>Einstein begins studying at the Zurich Polytechnic in a teachers' training program.</li>
        <li><strong> 1912: </strong>Einstein is appointed professor of theoretical physics at the Zurich Polytechnic.</li>
        <li><strong>1912: </strong>·Einstein begins collaborating with Marcel Grossman about the general theory of relativity.</li>
     </ul></div>
    <div class="end">Click here for <a href="https://en.wikipedia.org/wiki/Albert_Einstein" id="tribute-link" target="_blank">more information</a> about his life and work on science.</div>
    
</main>
</body>
 

              
            
!

CSS

              
                /* TALVEZ TENHA QUE MUDAR TODO O CSS. VOU DEIXAR SALVO*/
@import url('https://fonts.googleapis.com/css2?family=Goldman&display=swap');
main{
  font-family:"Trebuchet MS", "Tahoma";
}
h1{
  text-align:center;
  padding-bottom: 70px;
  padding-top:45px;
  margin-top:0px;
  font-size: 50px;
  background-color: #b1cbbb;
  color: #2A4550;
  border-radius:5px;
  font-family: "Goldman","Trebuchet MS";
   
}
#atom{
  position:relative;
  bottom:180px;
  left: 270px;
  max-width: 100%;
  height: auto;
  
}


body{
  text-align: center;
  background-color:#f0efef;
  color: #2A4550;
}

li {
  text-decoration:none;
  position:relative;
  left:0;
  padding-bottom:15px;
  text-align: left;
  
}

#image{
  border-radius: 2%; 
  max-width: 100%;
  height: auto;
  display:block;
  margin:auto;
  box-shadow:5px;
    
}
#tribute-info {
  position:relative;
  bottom: 200px;
  font-size:15px;
  color:#000;
  font-family:Goldman;
}

a:hover{
  color:green;
}

h2{
  padding-top:50px;
   padding-bottom:30px;
}
.caixa{
  border: 5px solid #e0876a;
  width:-80%;
  background-color:#f9ccac;
  margin-top:50px;
  margin-right: 110px;
  margin-left:110px;
  display:flex;
  flex-direction:column;/*o flex direction permite que os children sejam dispostos em linhas ou colunas*/
}

#tribute-link {
  margin-top: 50px;
}
#img-div{
  position: relative;
  bottom:100px;
}

#main-text{
  text-align:justify;
  padding-right:100px;
  padding-left:100px;
  line-height: 1.8;
  
}

ul{
  text-decoration:none;
}

.end {
  position:relative;
  top:70px;
  font-size: 18px;
  font-family: Goldman;
}


              
            
!

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