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

              
                <body>
  <header class="container">
    <div id="img-div">
      <img id="image" src="https://freesvg.org/img/G-W-Carver.png">
      <figcaption id="img-caption">Image: George Washington Carver</figcaption>
    </div>
    <div id="title-container" <h1 id="title">George Washington Carver<br> Tribute Page</h1>
    </div>
  </header>

  <main id="main">
    <div class="container">
      <div id="about">
        <p id="tribute-info">George Washington Carver was born in 1864, and went on to become a prominent scholar, educator, and inventor. He is most known for his descoveries involving the peanut. George made use of the peanut in over a 100 different ways, and contributed to important innovations and advancements.</p>
      </div>
      <div id="about">
        <iframe width="100%" height="315" src="https://www.youtube.com/embed/r6lPT6YzWF0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
      </div>
    </div>

    <div class="container">
      <div id="card">
        <h2>1864</h2>
        <p>George Washington Carver is born a slave in Missouri, and he is kidnapped by men.</p>
      </div>

      <div id="card">
        <h2>1871</h2>
        <p>George begins keeping his own garden and is known as the “Plant Doctor.</p>
      </div>

      <div id="card">
        <h2>1877</h2>
        <p>George moves to a new city and leaves his family so he can attend school offered to Negroes. He earned money by doing other people’s laundry and cleaning their houses.</p>
      </div>

      <div id="card">
        <h2>1890</h2>
        <p>Carver enrolls at Simpson College and opens a laundry mat to earn money. He thought about becoming an artist.</p>
      </div>

      <div id="card">
        <h2>1894</h2>
        <p>Carver earns his Bachelor’s degree in Agriculture at Iowa Agricultural College.</p>
      </div>

      <div id="card">
        <h2>1896</h2>
        <p>Carver is asked by Booker T. Washington to be a teacher at the Tuskegee Institute in Alabama.</p>
      </div>

      <div id="card">
        <h2>1906</h2>
        <p>George begins teaching rural people about using different crops each year to make the soil better. He said that sweet potatoes and peanuts were good plants to grow.</p>
      </div>

      <div id="card">
        <h2>1913</h2>
        <p>Carver offers his first Sunday Evening Bible classes at the request of his students.</p>
      </div>
      <div id="card">
        <h2>1916</h2>
        <p>George is named the Fellow of Royal Society for the Arts for his contribution of agricultural research.</p>
      </div>
    </div>
    <p>For more information about<a id="tribute-link" target=_blank href="https://en.wikipedia.org/wiki/George_Washington_Carver">George Washington Carver</a>, please visit Wikipedia.</p>
    <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

  </main>
</body>
              
            
!

CSS

              
                /* Styling for media queries ------------- */
@media screen and (max-width: 800px) {
  .container {
    flex-direction: column;
  }
  div#about {
    display: block;
    margin-left: auto;
    margin-right: auto;
    font-size: 20px;
    width: 60%;
  }
  h1#title {
    font-size: 52px;
    margin: auto;
  }
  #image {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
  }
  div#card {
    font-size: 18px;
    flex: column;
    margin: auto;
    margin-bottom: 50px;
    width: 70%;
  }
}
/*  End of styling for media queries --------------- */

/* Styling for body ------------- */
body {
  background: linear-gradient(180deg, black 60%, white);
}
/*  End of styling for body --------------- */

/* Styling for header ---------- */
#title {
  color: white;
}

#img-div {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 50%;
  float: left;
  border-radius: 50%;
}
#image {
  max-width: 50%;
  float: left;
  margin: auto;
  background-color: gray;
  border-radius: 50%;
  margin: auto;
}
#title {
  width: 30%;
  font-size: 6em;
  padding: 30px;
  margin: auto;
  text-align: left;
}

/*  End of styling for header ----------- */

/* Styling for containers ---------- */
.container {
  display: flex;
  flex-wrap: wrap;
  margin: auto;
  width: 100%;
  text-align: center;
}

/*  End of styling for containers -------- */

/* Styling for about ------- */
#about {
  width: 40%;
  margin: auto;
  padding: 40px;
  float: left;
  font-size: 2em;
  text-align: left;
  color: white;
}
/*  End of styling for about -------- */

/* Stylin for cards --------*/
#card {
  width: 25%;
  background-color: black;
  border: white solid 2px;
  padding: 10px;
  height: 200px;
  color: black;
  box-shadow: 5px 5px gray, 5px 10px white;
  border-radius: 5px;
  font-size: 1em;
  margin: auto;
  margin-bottom: 50px;
  text-align: left;
}

#card:hover {
  width: 25%;
  background-color: white;
  border: white solid 2px;
  padding: 10px;
  height: 200px;
  color: black;
  box-shadow: 5px 5px gray, 5px 10px white;
  border-radius: 5px;
  font-size: 1em;
  margin: auto;
  margin-bottom: 50px;
  text-align: left;
}

h2 {
  text-align: center;
}
/* End of styling for cards -------*/

              
            
!

JS

              
                
              
            
!
999px

Console