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. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

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

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">Ernest Hemingway</h1>
  <div id="content">
  <div id="img-div">
    <img id="image" src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/73/Ernest_Hemingway_Writing_at_Campsite_in_Kenya_-_NARA_-_192655.jpg/800px-Ernest_Hemingway_Writing_at_Campsite_in_Kenya_-_NARA_-_192655.jpg">
    
    <div id="img-caption">
      <small>Ernest Hemingway Writing at a Campsite in Kenya - circa 1953.</small>
    </div>
    </div>
  
  <div id="tribute-info">
    <h2>A (very) Short Summary of Hemingway's life</h2>
    <small>The information below is copied (with minimal edits for readability) from <a href="https://www.biography.com/writer/ernest-hemingway">here</a>.</small>
    <p>
      Born on July 21, 1899, in Cicero (now in Oak Park), Illinois, Ernest Hemingway served in World War I and worked in journalism before publishing his short story collection <a href="https://en.wikipedia.org/wiki/In_Our_Time_(short_story_collection)">In Our Time</a>.
    </p>
    <p>
      He was renowned for novels like:
    </p>
    <ul>
      <li>The Sun Also Rises</li>
      <li>A Farewell to Arms</li>
      <li>For Whom the Bell Tolls</li>
      <li>The Old Man and the Sea</li>
      <li>...and <a href="https://en.wikipedia.org/wiki/Ernest_Hemingway_bibliography#Works">many more</a>!</li>
    </ul>
    </p>
    <p>
      The Old Man and the Sea won the 1953 Pulitzer. In 1954, Hemingway won the Nobel Prize. He committed suicide on July 2, 1961, in Ketchum, Idaho.
    </p>
    <p>
      <a id="tribute-link" href="https://en.wikipedia.org/wiki/Ernest_Hemingway" target="_blank">Find out more information about Ernest Hemingway here.</a>
    </p>
  </div>
  <footer id="footer">
    <small>
      Made by <a href="https://zacharyparsons.co.uk">Zachary</a> as a <a href="https://learn.freecodecamp.org">FreeCodeCamp</a> project
    </small>
  </footer>
  </div>
</main>
              
            
!

CSS

              
                body {
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
  text-align: justify;
}

main {
  max-width: 75%;
  margin: auto;
}

img {
  max-width: 60%;
  display: block;
  height: auto;
  margin: 0 auto;
}

#img-caption {
  text-align: center;
}

#tribute-info {
  padding-top: 15px;
}

#content {
  padding-bottom: 20px;
}

#title, h2 {
  color: seagreen;
  margin: 0 auto;
  padding: 20px;
}

a {
  color: seagreen;
  text-decoration: none;
}

a:hover {
  color: mediumseagreen;
}

ul {
  list-style: none;
}

#footer {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  background-color: seagreen;
  color: white;
  text-align: center;
}

#footer a {
  color: darkseagreen;
}

#footer a:hover {
  text-decoration: underline;
}
              
            
!

JS

              
                
              
            
!
999px

Console