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 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/css?family=Roboto" rel="stylesheet">

<main id="main">
  <div id="title">
    <h1>Freddie Mercury</h1>
  </div>
  <div id="img-div"><img id="image" src="https://www.billboard.com/files/styles/article_main_image/public/media/freddie-mercury-of-queen-1986-billboard-650.jpg" alt="Freddie Mercury's Iconic Poster">
    <p id="img-caption">
      The Most Rare Stylish Photos of Queen and Freddie Mercury - Bohemian Rhapsody Anniversary
    </p>
  </div>
  <div id="tribute-info">
    <h2>Who is Freddie Mercury?</h2>
    <p>
      Singer-songwriter Freddie Mercury was born Farrokh Bulsara on September 5, 1946, in Zanzibar, Tanzania. He studied piano in boarding school in India and befriended numerous musicians at London's Ealing College of Art. The music of Mercury's band, Queen,
      reached the top of U.S. and British charts. Mercury died of AIDS-related bronchial pneumonia on November 24, 1991, at age 45.
    </p>
    
    <h2>Queen</h2>
    
    <p>
      As a performer, he was known for his vocal abilities (he had a rare four-octave range) and flamboyant stage performances. He dressed in a range of extravagant costumes and was a supreme entertainer. As a songwriter, he composed many international hits, including “Bohemian Rhapsody”, “Killer Queen”, “Somebody to Love”, “Don’t Stop Me Now”, “We Are the Champions” and “Crazy Little Thing Called Love”.
</p><p>
In addition to his work with Queen, he also led a solo career and was occasionally a producer and guest musician (piano or vocals) for other artists. In his second solo album Barcelona (1988) he fused both opera and pop, causing a mixture of critical responses. However, it proved a great commercial success.
</p><p>
Mercury, who was of Parsi descent, he was born in Zanzibar and grew up in India. He has been referred to as “Britain’s first Asian rock star.” He died of bronchopneumonia induced by HIV (AIDS) on 24 November 1991, only one day after publicly acknowledging he had the disease – at a time when there was stigma over Aids. His boyfriend, later said Mercury had been diagnosed with HIV in 1987.
</p><p>
An extrovert on stage, he was introverted off the stage. He rarely gave interviews and kept himself to himself. He was bisexual and had a long-term relationship with Mary Austin.
</p><p>
In 2006, Time Asia named him as one of the most influential Asian heroes of the past 60 years, and he continues to be cited as one of the greatest singers in the history of popular music.
</p><p>
In 2008, Rolling Stone ranked Mercury eighteenth on its List of the 100 Greatest Singers of All Time.
    </p>
    
    <h2>Bio Picture</h2>
    
    <p><i><a href="https://www.youtube.com/watch?v=mP0VHJYFOAU">Bohemian Rhapsody</a></i>, starring Mr. Robot's Rami Malek as Mercury, follows the band's rise leading up to their legendary Live Aid performance in 1985.Bohemian Rhapsody</p>

    <p>If you are intersted, you can read more about <a id="tribute-link" href="https://en.wikipedia.org/wiki/Freddie_Mercury" target="_blank">Freddie Mercury</a> from Wikipedia.</p>
  </div>
</main>
              
            
!

CSS

              
                body {
  background-color: hsl(360deg, 2%, 90%);
  margin: 0px;
  font-family: 'Roboto', sans-serif;
}
main {
  width: 100%;
  margin: 0px auto;
}
p {
  font-size: 1.5rem;
  text-align: justify;
}

#title {
/*   background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet); */
  background-color: hsl(0deg, 45%, 50%);
}

h1 {
  text-align: center;
  padding: 1rem;
  font-size: 3rem;
  color: rgba(255, 255, 255, .9);
  margin-top: 0px;
}

#img-div {
  margin: auto;
  width: 70%;
}

#img-div img {
  height: auto;
  width: 100%;
  max-width: 100%;
  display: block;
}

#img-caption {
  text-align: center;
  font-size: 1.5rem;
}

#tribute-info {
  width: 70%;
  margin: auto;
  padding: 2rem 0rem;
}
h2 {
  font-size: 2rem;
}

              
            
!

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