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

              
                <main id="main">
  <div id="img-div">

    <figure>
      <img id="image" src="https://www.toledoblade.com/image/2020/10/06/1200x/People-Eddie-Van-Halen.jpg" alt="Eddie Van Halen Playing Guitar">
      <div id="title">
        <h1>Eddie Van Halen</h1>
        <p>one of the all-time great guitar players in rock history</p>
      </div>
      <figcaption id="img-caption">Eddie Van Halen of the band Van Halen performing in Los Angeles on June 1, 2012</figcaption>
    </figure>
  </div>
  <article id="tribute-info">
    <h2>Life and Death of Eddie Van Halen</h2>
    <p>Main songwriter and guitarist of the band Van Halen, co-founded in 1972 with his brother Alex Van Halen.</p>
    <p>Popularized the tapping guitar solo technique.</p>
    <p>
      Van Halen's 1978 instrumental solo "Eruption", which was voted number 2 in Guitar World's readers poll of the "100 Greatest Guitar Solos", showcased a solo technique called tapping, using both left and right hands on the guitar neck
    </p>
    <p>
      He began receiving treatment for tongue cancer in 2000. The subsequent surgery removed roughly a third of his tongue. He was declared cancer-free in 2002. He blamed the tongue cancer on his habit of holding guitar picks in his mouth, stating in 2015: <q>I used metal picks – they're brass and copper – which I always held in my mouth, in the exact place where I got the tongue cancer.</q>
    </p>
    <p>
      Van Halen was later hospitalized in 2019 after battling throat cancer over the previous five years, and his ex-wife Valerie Bertinelli also mentioned a battle with lung cancer in an Instagram post shortly after his death. He died from the illness at Saint John's Health Center in Santa Monica, California on October 6, 2020, at the age of 65
    </p>
  </article>
  <footer>
    <a id="tribute-link" href="https://en.wikipedia.org/wiki/Eddie_Van_Halen" target="_blank">Visit the Eddie Van Halen Wikipedia page</a> for more info.
  </footer>
</main>

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

<script src="./script.js"></script>
              
            
!

CSS

              
                
body {
  margin: 0;
}

#main {
  background-color: #525657;
}

#img-caption {
  color: #e4e4e4;
  font-family: "Exo 2", sans-serif;
  font-size: 30px;
  font-weight: bold;
  position: absolute;
  width: 10%;
  bottom: 10%;
  left: 3%;
}

figure {
  position: relative;
  margin: 0;
  background-color: 525657;
}

#title {
  font-family: "Exo", sans-serif;
  position: absolute;
  top: 12%;
  left: 57%;
}

#title h1 {
  color: #ffffff;
  font-size: 80px;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

#title p {
  color: #d1d1d1;
  font-size: 30px;
}

#image {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
}

#img-div {
  background-color: #020202;
}

#tribute-info {
  background-color: #131313;
  padding-top: 0;
  margin-top: 0;
  font-family: "Exo 2", sans-serif;
  padding-bottom: 1%;
  color: #e4e4e4;
}

#tribute-info h2 {
  text-align: center;
  background-color: #616161;
  margin: 0 0 0 0;
  border-color: #2e2e2e;
  border-style: solid;
  border-width: thin;
  font-size: 70px;
}

#tribute-info p {
  padding: 0 5% 0 5%;
  font-size: 30px;
}

footer {
  text-align: center;
  padding: 1% 0;
  font-family: "Exo 2", sans-serif;
  color: #e4e4e4;
}

#tribute-link {
  text-decoration: none;
  color:#D9BB96;
}

#tribute-link:hover {
  color: azure;
}

@media (max-width: 950px) {
  #title h1 {
    font-size: 50px;
  }

  #title p {
    font-size: 16px;
  }

  footer {
    padding: 10% 0;
  }
}

@media (max-width: 606px) {
  #title h1 {
    font-size: 40px;
  }

  #title p {
    font-size: 12px;
  }

  #tribute-info h2 {
    font-size: 47px;
  }
}

@media (max-width: 488px) {
  #title h1 {
    font-size: 35px;
  }

  #title p {
    font-size: 12px;
  }
}

@media (max-width: 429px) {
  #title h1 {
    font-size: 30px;
  }

  #title p {
    font-size: 12px;
  }

  #img-caption {
    font-size: 10px;
    font-weight: bold;
  }
}

@media (max-width: 1050px) {
  #img-caption {
    font-size: 20px;
    font-weight: bold;
  }
}

@media (max-width: 725px) {
  #img-caption {
    font-size: 10px;
    font-weight: bold;
  }
}

              
            
!

JS

              
                // !! IMPORTANT README:

// You may add additional external JS and CSS as needed to complete the project, however the current external resource MUST remain in place for the tests to work. BABEL must also be left in place. 

/***********
INSTRUCTIONS:
  - Select the project you would 
    like to complete from the dropdown 
    menu.
  - Click the "RUN TESTS" button to
    run the tests against the blank 
    pen.
  - Click the "TESTS" button to see 
    the individual test cases. 
    (should all be failing at first)
  - Start coding! As you fulfill each
    test case, you will see them go   
    from red to green.
  - As you start to build out your 
    project, when tests are failing, 
    you should get helpful errors 
    along the way!
    ************/

// PLEASE NOTE: Adding global style rules using the * selector, or by adding rules to body {..} or html {..}, or to all elements within body or html, i.e. h1 {..}, has the potential to pollute the test suite's CSS. Try adding: * { color: red }, for a quick example!

// Once you have read the above messages, you can delete all comments. 

              
            
!
999px

Console