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/css2?family=Kanit:wght@400;900&display=swap" rel="stylesheet">
<main id="main">
  <h1>DON'T PANIC</h1>
  <section id="flex-container">
  <div id="img-div">
  <img id="image" src="https://images.gr-assets.com/authors/1189120061p8/4.jpg" alt="">
    <figcaption id="img-caption">Fig. Photo of Douglas Adams in black and white</figcaption>
    </div>
  <h2 id="title">Douglas Adams</h1>
  
  <div id="tribute-info">
    <p>Douglas Adams is most famous for the "trilogy" of 5 books The Hitchhiker's Guide to the Galaxy. Before writing Hitchhiker's Guide and just after finishing college, Adams moved to London attempting to break into movie and radio writing. He had minor successes and helped co-write and also appeared in a few Monty Python skits. He also served as a script editor on Doctor Who's 17th season and even wrote the scripts for two different episodes. Hitchhiker's Guide originally began as a radio show, but soon after they were published as novels. Douglas Adams passed away in 2001 of a heart attack.</p>
    </div>
  <div class="anchor-div">
  <a id="tribute-link" href="https://en.wikipedia.org/wiki/Douglas_Adams" target="_blank">More info on Douglas Adams</a>
    <div>
  </section>
</main>

              
            
!

CSS

              
                body {
  background-image: url(https://cdn.spacetelescope.org/archives/images/screen/heic1501a.jpg);
  background-size: cover; 
  font-family: 'Kanit', sans-serif;
}
#main {
  display: flex;
  flex-direction: column; 
  align-items: center; 
  height: 100%;
}
#flex-container {
background-color: #a8a6a6;
  padding: 25px;  
  max-width: 40em;
  display: flex;
  flex-direction: column;
  align-items: center; 
  border-radius: 1%; 
}
#image-div {
  display: flex;
  flex-direction: column;
  align-items: center; 
}
#image {
  max-width: 100%;
  height: auto;
  display: block;
}
#img-caption {
 text-align: center; 
 padding-top: 0px; 
}

h1 {
  font-size: 50px; 
  text-align: center;
  margin-bottom: 30px; 
  color: #fff; 
}

#title {
  margin-top: 5px; 
  text-align: center; 
  margin-bottom: 5px; 
}
.anchor-div {
  justify-content: center; 
  display: flex; 
}
#tribute-link {
  text-align: center; 
}
              
            
!

JS

              
                
              
            
!
999px

Console