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=Exo" rel="stylesheet">

<main id="main">

  <header>
    <h1 id="title">Neil DeGrasse Tyson</h1>
  </header>

  <div class="two">
    <p><a class="links" href="https://en.wikipedia.org/wiki/Neil_deGrasse_Tyson" id="tribute-link" target="_blank">Wikipedia Page </a> &#149;
      <a class="links" href="https://www.haydenplanetarium.org/tyson/" target="_blank">Hayden Planetarium </a> &#149;
      <a class="links" href="https://twitter.com/neiltyson?ref_src=twsrc%5Egoogle%7Ctwcamp%5Eserp%7Ctwgr%5Eauthor" target="_blank">Twitter Page</a>
    </p>
  </div>

  <div class="three">
    <h2></h2>
    <div id="img-div">
      <img src="https://data.junkee.com/wp-content/uploads/2014/11/Cosmos-Neil-deGrasse-Tyson.jpg" id="image" alt="Neil DeGrasse Tyson">
      <h3 id="img-caption">Neil DeGrasse Tyson stands out amongst the universe.</h3>
    </div>
    <div id="info">
      <p id="tribute-info" class="info-text"> Neil deGrasse Tyson (/dəˈɡræs/; born October 5, 1958) is an American astrophysicist, author, and science communicator. Since 1996, he has been the Frederick P. Rose Director of the Hayden Planetarium at the Rose Center for Earth and Space in New
        York City. The center is part of the American Museum of Natural History, where Tyson founded the Department of Astrophysics in 1997 and has been a research associate in the department since 2003.</p>

      <p class="info-text">Tyson studied at Harvard University, the University of Texas at Austin and Columbia University. From 1991 to 1994 he was a postdoctoral research associate at Princeton University. In 1994, he joined the Hayden Planetarium as a staff scientist and
        the Princeton faculty as a visiting research scientist and lecturer. In 1996, he became director of the planetarium and oversaw its $210 million reconstruction project, which was completed in 2000.
      </p>
      <h2 class="info-text">Awards</h2>
      <p><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/9/96/Bill_Nye%2C_Barack_Obama_and_Neil_deGrasse_Tyson_selfie_2014.jpg/800px-Bill_Nye%2C_Barack_Obama_and_Neil_deGrasse_Tyson_selfie_2014.jpg" id="image1" alt="Bill Nye, Barack Obama and Neil DeGrasse Tyson taking a selfie"></p>
      <p>
        <ul>
          <li class="info-text">2001 Medal of Excellence, Columbia University, New York City</li>
          <li class="info-text">2004 NASA Distinguished Public Service Medal</li>
          <li class="info-text">2005 Science Writing Award</li>
          <li class="info-text">2007 Klopsteg Memorial Award winner</li>
          <li class="info-text">2009 Douglas S. Morrow Public Outreach Award from the Space Foundation for significant contributions to public awareness of space programs</li>
          <li class="info-text">2009 Isaac Asimov Award from the American Humanist Association</li>
          <li class="info-text">2014 Critics' Choice Television Award for Best Reality Show Host</li>
          <li class="info-text">2014 Dunlap Prize</li>
          <li class="info-text">2015 Public Welfare Medal from the National Academy of Sciences</li>
          <li class="info-text">2015 Cosmos Award, Planetary Society</li>
          <li class="info-text">2017 Hubbard Medal, National Geographic Society</li>
          <li class="info-text">2017 Stephen Hawking Medal for Science Communication, Starmus</li>
          <li class="info-text">2017 Grammy Award for Best Spoken Word Album nomination for Astrophysics for People in a Hurry</li>
        </ul>
    </div>
  </div>

  <footer>
    <p>Created by Allison Bunt 2019 - Free Code Camp Tribute Page</p>
  </footer>

</main>
              
            
!

CSS

              
                body {
  background-color: hsl(245, 20%, 10%);
}

p,
h1,
h2 {
  color: rgba(242, 186, 162, 1);
  padding-top: 1%;
  margin: auto;
  text-align: center;
}

h1 {
  font-family: "Exo", sans-serif;
  font-size: 2em;
}

a {
  color: #f8d1c3;
}

#img-caption {
  position: relative;
  bottom: 20px;
  text-align: center;
}

.info-text {
  color: rgb(56, 27, 15);
  width: 90%;
}

#image {
  margin: auto;
  width: 75%;
  max-width: 100%;
  display: block;
  height: auto;
  border-radius: 150px;
}

#image1 {
  margin: auto;
  padding-left: 10px;
  width: 50%;
  max-width: 100%;
  display: block;
  height: auto;
  border-radius: 40px;
}

#main {
  display: grid;
  width: 85%;
  margin: auto;
  grid-template-columns: 1fr 60%;
  grid-gap: 3px;
  grid-template-rows: 4em 2em 100% 4.5em;
  grid-template-areas:
    "header header"
    "nav nav"
    "content content"
    "footer footer";
  justify-items: center;
}

@media (max-width: 475px) {
  /*#main {
    grid-template-rows: 3.5em 3em 100% 4.5em;
  grid-template-areas:
    "header header"
    "nav nav"
    "content content"
    "footer footer";
  }*/
  h1 {
    font-size: 1.5em;
  }
  a {
    font-size: 0.6em;
  }
}

.links {
}

header {
  background: linear-gradient(360deg, rgb(0, 0, 0), rgba(63, 59, 107, 0.9));
  width: 100%;
  grid-area: header;
  border-radius: 10px 10px 0px 0px;
  box-shadow: 0 3px 6px black;
}

.two {
  background-color: hsl(245, 10%, 35%);
  width: 100%;
  grid-area: nav;
  border-radius: 5px;
}

.three {
  background-color: #898989;
  width: 100%;
  grid-area: content;
  border-radius: 10px;
  box-shadow: 0 3px 6px black;
}

footer {
  background-color: #232323;
  grid-area: footer;
  width: 100%;
}

              
            
!

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