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>

<div id="main">
  <div id="title" class="darken">
    <h1 id="heading">Sir Winston Churchill</h1>
  </div>
  <div id="img-div">
    <img id="image" src="https://cdn.vox-cdn.com/thumbor/D6_O907jNEs8krJdVL6JfoTDNAk=/0x0:590x760/1200x800/filters:focal(246x184:340x278)/cdn.vox-cdn.com/uploads/chorus_image/image/53246041/Sir_Winston_Churchill___19086236948.0.jpg" alt="Churchill smoking a cigar">
    <p id="img-caption">The British Bulldog</p>
  </div>
  <div id="tribute-info">
    <h2 id="tribute-title">A few of Churchill's most noteable achievements</h2>
    <ul id="list">
      <li><strong>1895</strong> - Joins the British Army fighting in British India, the Anglo–Sudan War, and the Second Boer War</li>
      <li><strong>1940</strong> - Serves as prime minister during World War II leading Britain to victory</li>
      <li><strong>1951</strong> - Re-elected as prime minister Churchill focuses on partnering with Europe to go against the Soviets</li>
      <li><strong>1955</strong> - Churchill resigns as prime minister in failing health but remains an MP until 1964</li>
      <li><strong>1965</strong> - The state hosts Sir Winston Churchill's funeral as the country mournes</li>
    </ul>
  </div>
  <div>
    <p id="footer">To get a glimpse into the life of this legend check out one of his many <a class="links" id="tribute-link" target="_blank" href="https://www.amazon.com/s?k=winston+churchill+biography&ref=nb_sb_noss_2">biographies</a> or <a class="links" id="tribute-wiki" target="_blank" href="https://en.wikipedia.org/wiki/Winston_Churchill">Wikipedia</a> page.</p>
  </div>
</div>
              
            
!

CSS

              
                html {
  font-size: 10px;
  color: #222;
}
#main {
  font-family: lato, sans-serif;
  text-align: center;
  line-height: 150%;
}
#title {
  padding: 10px 20px;
  font-size: 35px;
  margin: 15px 50px 15px 50px;
  border: 2px solid white;
  border-radius: 10px; 
  color: #fff;
}
@media (max-width: 800px) {
  #title{
  font-size: 30px;
}
}
#heading {
  font-weight: 300;
}
#bulldog {
  font-size: 20px;
}
#image {
  max-width: 50%;
  display: block;
  height: auto;
  margin: 0 auto;
}
.darken {
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url("https://wallpapercave.com/wp/wp2096533.jpg");
  background-position: center;
  background-size: 100%;
}
#img-div {
  margin-top: 75px;
  padding-top: 10px;
}
#img-caption {
 line-height: 0px;
  font-size: 1.8rem;
}
#tribute-title {
  padding-top: 15px;
  font-size: 45px;
  line-height: 135%;
  font-weight: 300;
  margin-top: 75px;
}
#list {
  text-align: left;
  line-height: 150%;
  display: inline-block;
  font-size: 22px;
  list-style-type: none;
}
#footer {
  font-size: 25px;
  line-height: 150%;
  margin-top: 100px;
  color: #fff;
  background-color: #01020dcf;
    border-radius: 15px;
  padding: 20px;
}
.links {
  color: #ec7a0c;
}
              
            
!

JS

              
                
              
            
!
999px

Console