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 Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>

<div id="main">
  <div id="title">
    <h1>Lionell Messi</h1>
  </div>
  <figure id="img-div">
    <img id="image" src="https://upload.wikimedia.org/wikipedia/commons/9/92/NIG-ARG_%286%29.jpg">
    <figcaption id="img-caption">Lionel Andrés Messi Cuccittini celebrating after scoring a goal against Nigeria at the 2018 FIFA World Cup.</figcaption>
  </figure>
  <section id="tribute-info">
    <h1 id="info-title">Here's a brief introduction to Messi's life:</h1>
    <ul>
      <li><strong>Born:</strong> 24 June, 1987</li>
      <li>He is an Argentine professional footballer who plays as a forward and captains both Spanish club Barcelona and the Argentina national team.</li>
      <li>Messi has won a record six FIFA Ballon d'or/Best FIFA Men's Player awards,  and a record six European Golden Shoes. </li>
      <li>He has spent his entire professional career with Barcelona, where he has won a club-record 34 trophies, including ten La Liga titles, four UEFA Champions League titles and six Copas del Rey.</li>
      <li>Messi holds the records for most goals in La Liga (423), a La Liga and European league season (50), most hat-tricks in the UEFA Champions League (8), and most assists in La Liga (166) and the Copa América (13). He has scored over 700 senior career goals for club and country.</li>
      <li>According to France Football, Messi was the world's highest-paid footballer for five years out of six between 2009 and 2014, and was ranked the world's highest-paid athlete by Forbes in 2019.</li>
      <li> He was among Time's 100 most influential people in the world in 2011 and 2012.</li>
      <li>He married Antonella Roccuzzo on 11 September 2015 in Barcelona. They have three sons.</li>
      <li>He is still playing football as a forward and captains both Spanish club Barcelona and the Argentina national team.</li>
      <li>Official Website: <a href="https://messi.com">messi.com</a>
    </ul>
  </section>
  <h3 id="footerlink">To know more him, see about him on <a id="tribute-link" href="https://en.wikipedia.org/wiki/Lionel_Messi" target="_blank">Wikipedia</a></h3>
</div>

              
            
!

CSS

              
                body{
  font-size: 20px;
  color: grey;
  background: lightgrey;
}

a {
  color: lightgreen;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
a:visited {
  color: orange;
  text-decoration: underline;
}
#main {
  margin: 30px;
}


#title {
  text-align: center;
  color: grey;
  padding: 20px;
  margin: 10px;
  background: white;
  border: "";
  border-radius: 5px;
}

#img-div {
  background: white;
  border: "";
  border-radius: 5px;
}

#image {
  max-width: 50%;
  height: auto;
  display: block;
  margin: 0 auto;
  padding: 5px;
}
#img-caption{
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  padding: 10px;
}

#tribute-info {
  margin: 20px;
  border: "";
  border-radius: 5px;
  background: white;
}
#tribute-info ul li {
  padding: 5px;
}

#info-title {
  text-align: center;
  padding: 10px;
}

#footerlink {
  text-align: center;
}

@media only screen and (max-width: 380px) {
  #main {
    width: 100vw;
    text-align: center;
    margin: 0;
  }
  a {
    color: orange;
  }
}

              
            
!

JS

              
                
              
            
!
999px

Console