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>

<main id="main">
  <header>
    <figure id="img-div">
      <img src="https://upload.wikimedia.org/wikipedia/commons/3/37/GabrielleUnionFeb09_cropped.jpg" id="image" alt="image of actress gabrielle union">
      <figcaption id="img-caption">Gabrielle Union, 2009</figcaption>
    </figure>
    <article>
    <h1 id="title">Gabrielle Union</h1>
    <p>An American actress, activist and author</p>
    <p id="p-smallscreen">actress, activist and author</p>
      
</article>
  </header>

 
  <section id="content-wrap">
    <div id="tribute-info">
      <ul>
        <li><strong>1972</strong> - Born in Omaha, Nebraska, U.S.</li>
        <li><strong>1996</strong> - First audition for the television show Saved by the Bell</li>
        <li><strong>2000</strong> - Cast in the cheerleading movie <i>Bring It On</i></li>
        <li><strong>2003</strong> - First leading Role in <i>Deliver Us from Eva</i>. She also landed a role in the film <i>Bad Boys II</i>.</li>
        <li><strong>2005</strong> - Starred in the remake of The Honeymooners and in the short-lived ABC series <i>Night Stalker</i>.</li>
        <li><strong>2006</strong> -Starred in a music video for Busta Rhymes</li>
        <li><strong>2007</strong> - Made an appearance in the Christmas film <i>The Perfect Holiday</i>.</li>
      </ul>
    </div>
    
    <div id="tribute-info-1">
      <ul>
        <li><strong>2008</strong> - Appeared in three episodes of on <i>Ugly Betty</i>for three episodes as Renee</li>
        <li><strong>2013</strong> - Began starring in the BET network show <i>Being Mary Jane</i></li>
        <li><strong>2017</strong> - Launched Flawless by Gabrielle Union, a line of hair-care products. Announced her first book We're Going to <i>Need More Wine</i>, named a Best Book of the Year by a Black Author by The Root magazine.</li>
        <li><strong>2019</strong> - Began starring as Syd Burnett in the Bad Boys spin-off television series <i>L.A.'s Finest</i></li>
        <li><strong>2020</strong> - Released her first children's book - <i>Welcome to the Party</i>, inspired by her daughter. </li>
      </ul>
    </div>
  </section>
</main>
<footer>
  <a href="https://en.wikipedia.org/wiki/Gabrielle_Union" target="_blank" id="tribute-link">Read more about Gabrielle Union's life and career.</a>
</footer>
              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,300;0,600;1,300&display=swap');


body {
  background-color: #ef8c75;
  color: #000;
  font-size: 16px;
  width: 100vw;
  margin-left: auto;
  margin-right: auto;
  margin-top: 2rem;
  line-height: 1.4;
  font-family: 'Fira Sans', sans-serif;
}

* {
  box-sizing: border-box;
}



header {
  display: flex;
  width: 85vw;
  margin-left: auto;
  margin-right: auto;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
 max-width: 1200px;
 justify-content: center;
    padding-top: 1rem;
  padding-bottom: 1rem;
}

article {
 display: flex;
 flex-direction: column;
 align-items: center; 
 justify-content: center;
  width: 50%;
}


#image {
  max-width: 100%;
  height: auto;
}

#img-caption {
  margin-top: .5rem;
  display: none;
}


h1 {
  font-size: 4rem;
  margin: 0;
  background-color: #fcf4ef;
  padding-left: 1rem;
  padding-right: 1rem;
}

article p {
  margin-top: .5rem;
  margin-bottom: 1.8rem;
  background-color: #fcf4ef;
  padding-left: 1rem;
}

#p-smallscreen {
  display: none;
}

/* Flex-container and ul */
#content-wrap {
  display: flex;
  width: 85vw;
  margin-left: auto;
  margin-right: auto;
  margin-top: 1rem;
  background-color: #fcf4ef;
  box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
 max-width: 1200px;
 justify-content: center;
  padding-top: 1rem;
  padding-bottom: 1rem;
}


#tribute-info,
#tribute-info-1 {
  width: 42%;
}


#main ul {
  width: 100%;
  list-style: none;
  padding-right: 1rem;
  padding-left: 0;
  margin: 0;
}


#main ul li {
  padding-bottom: 1.2rem;
}

#main ul li:first-child {
  padding-top: 1.2rem;
}


#tribute-info-1 {
  border-left: 2px solid rgba(239,140,117, 0.2);
  padding-right: 0;
  padding-left: 1rem;
}

/* Footer  */

footer {
  width: 70vw;
  height: 5vh;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  font-size: 1rem;
  font-weight: bold;
  
}

#tribute-link {
  display: inline-block;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
}

footer a:link {
  color: #000;
}

footer a:visited {
   color: #000;
}

footer a:active {
   color: #000;
}

footer a:hover {
    color: #fff;
}


@media (max-width: 1140px) {
  header {
    width: 90vw;
  }  
  
article {
  width: 55%;
}
  
#content-wrap {
  width: 90vw;
 }
}

@media (max-width: 1080px) {
#content-wrap,
header {
  width: 95vw;
}

#main ul {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: .5rem;
 }
  
footer {
  width: 100vw;
}
}


@media (max-width: 1000px) { 
  figure {
    display: inline-block;
  }
  
header {
  flex-direction: column-reverse;
  justify-content: center;
  align-items: center;
  width: 90vw;
  }
  
  h1 {
    font-size: 3rem;
  }
  
article p {
  margin-bottom: .8rem;
}
  
  article {
    width: 95%;
  }
  #content-wrap {
    width: 90vw;
    margin-top: 0;
  }
}

@media (max-width: 541px) {
  header, 
  #content-wrap {
    width: 100vw;
  }
  
  article {
    width: 95%;
  }
  
  #content-wrap {
    flex-direction: column;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  #tribute-info,
  #tribute-info-1{
    width: 100%;
  }
  
  #main ul {
width: 100%;
}

#tribute-info-1 {
  padding-left: 0;
  border: 0;
}
 
  #tribute-info-1 ul li:first-child {
    padding-top: 0;
  }
}


@media (max-width: 410px) {
  h1 {
    font-size: 2rem;
  }
  
  article p {
 display: none;
}

#p-smallscreen {
  display: block;
} 
  
  #image {
    width: 250px;
    height: auto;
  }
}
              
            
!

JS

              
                
              
            
!
999px

Console