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 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

              
                <div class="main-content">
  <h1>Terry Pratchett</h1>
  <h3><em>Great Author!</em></h3>
  <div class="main-image">
    <img src="https://c2.staticflickr.com/2/1027/1446167614_9ebb30832f_b.jpg" alt="temp pic">
    <p class="caption">Sir Terry Pratchett at a book presentation event.
      <em>Picture by 
      <a href="https://www.flickr.com/photos/firepile/">Robin Zebrowski</a>. 
      <a href="https://creativecommons.org/licenses/by/2.0/">Some rights reserved.</a>
      </em>
    </p>
  </div>
  <p>Sir Terry Pratchett (1948-2015) was a author of fantasy books, usually comical works. His most known book series is the <em>Discworld</em> series. The fictional <em>Discworld</em> is a flat disc balanced on the backs of four elephants which stand on
    the back of a giant turtle called "Great A'Tuin" who travels through the Discworld universe's space. </p>

  <p>His first novel, called <em>The Carpet People</em>, was not part of the Discworld series. Instead, it follows the adventures of a tribe across a world known as the "Carpet". </p>

  <p>His books sold more than 85 million copies worldwide in 37 different languages.</p>
  <p>In 2007, Terry Pratchett announced that he suffered from Alzheimer's disease. He passed away on 2015.</p>

  <p>If you have never read a book from Terry Pratchett, I can only recommend that you do! The books are filled with interesting characters, amazing adventures and lots of humour. If you would like to give it a try, check the recommended discworld <a href="http://www.terrypratchettbooks.com/discworld-reading-order/">reading order</a>.</p>

  <blockquote class="main-quote">“DON'T THINK OF IT AS DYING, said Death. JUST THINK OF IT AS LEAVING EARLY TO AVOID THE RUSH.”

    <cite>Terry Pratchett, Good Omens.</cite>
  </blockquote>

  <p class="final-words">If you're interested on learning more about the life and work of Sir Terry Pratchett, check his <a href="https://en.wikipedia.org/wiki/Terry_Pratchett">Wikipedia article</a>.</p>
</div>
<hr>
<div class="footer">
  Written and coded by <a href="https://www.freecodecamp.com/zelite">Zelite</a>.
</div>
              
            
!

CSS

              
                *{
  color: #494949;
  font-family: sans-serif; 
}


.main-content{
  width: 90%;
  margin: 6.25rem auto 3.125rem auto;
  background-color: #eeeeee;
  padding: 3.125rem 5% 3.125rem 5%;
  border-radius: 0.3125rem;
}

/*On bigger screens we get more space on the margins*/
@media (min-width: 900px){
  .main-content{
  width: 50%;
  }
}

h1{
  font-size: 3.25rem;
  text-align: center;
}

h3{
  font-weight: normal;
  text-align:center;
}

.main-image{
  background-color: white;
  padding: 0.1875rem;
  border-radius: 0.3125rem;
  border: 0.0625rem #d6d6d6 solid;
}

.main-image img{
  width: 100%;
  display: block;
}

.caption{
  font-size: smaller;
  margin: 0.125rem;
  text-align: center;
}

.footer{
  font-size: smaller;
  text-align: center;
}

.main-content > p{
  /* So that the main text paragraphs have
  wider margins than the image*/
  margin: 1rem 10% 1rem 10%;
}

.main-quote{
  font-family: 'Josefin Sans', sans-serif;
  font-size: 2.7rem;
 }

cite{
  display: block;
  font-family: inherit;  
  font-size: 2rem;
  color: #868686;
}

.final-words{
  margin-top: 3rem;
  font-size: 2rem;
}
hr{
  height:0.0625rem;
  background-color: #eeeeee;
  border: none;
}

a{
  color: #337ab7;  
}
              
            
!

JS

              
                
              
            
!
999px

Console