Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URLs 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 its URL and the proper URL extension.

+ 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>

<!-- 

Hello Camper!

For now, the test suite only works in Chrome! Please read the README below in the JS Editor before beginning. Feel free to delete this message once you have read it. Good luck and Happy Coding! 

- The freeCodeCamp Team 

-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width-device-width, initial-scale=1.0">
    <title>Nelson Mandela Tribute</title>
    <link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body id="main">
    <h1 id="title">Nelson Rolihlahla Mandela</h1>
    <p class="sub-title">Social rights activist, politician, and philanthropist</p>

    <figure id="img-div">
        <img id="image" src="https://i.postimg.cc/T1STpXdR/Nelson-Mandela.jpg" alt="photo of mandela">
        <figcaption id="img-caption">Nelson Mandela's first speech after being released from 27 years in prison</figcaption>
    </figure>

    <section id="tribute-info">
        <P>Here is a time line of Nelson Mandela's life:</P>

        <ul>
            <li><b>1918</b> &#8211; Born as Rolihlahla in Mvezo, Umtata. </li>
            <li><b>1925</b> &#8211; Attends primary school near Qunu(receives name 'Nelson' from a teacher)</li>
            <li><b>1934</b> &#8211; Goes to Calrkebury Boarding Institute in Engcobo</li>
            <li><b>1937</b> &#8211; Attends Healdtwon, the Wesleyan College at Fort Beaufort</li>
            <li><b>1939</b> &#8211; Enrolls at the University Collge of Fort Hare, in ALice</li>
            <li><b>1942</b> &#8211; Begins to attend African National Congress meetings informally</li>
            <li><b>1948</b> &#8211; Elected President of the ANCYL</li>
            <li><b>1953</b> &#8211; Devises the M-plan for the ANC'S future underground operations</li>
            <li><b>1962</b> &#8211; Sent to Robben Island and Pretoria Local Prison</li>
          <li><b>1990</b> &#8211; Released from prison</li>
            <li><b>2013</b> &#8211; Passes away at home in Johannesburg</li>
        </ul>
        <p></p>

        <blockquote cite="https://www.goalcast.com/2017/05/02/top-nelson-mandela-quotes-inspire-you-to-believe/">
            <p>
                "I learned that courage was not the absence of fear, 
                but the triumph over it. The brave man is not he who does not feel afraid, 
                but he who conquers that fear."
            </p>
           
            <cite>-- Nelson Mandela</cite>
        </blockquote>
        
        <h3>
        If you have time, you should read more about this incredible human being on his <a id="tribute-link" href="https://en.wikipedia.org/wiki/Nelson_Mandela" target="_blank">Wikipedia entry</a>
        </h3>
    
    </section>

    


</body>
</html>



              
            
!

CSS

              
                @import url('https://fonts.googleapis.com/css2?family=Rubik&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito:[email protected]&family=Rubik:[email protected]&display=swap');
html {
    font-size: 1.5rem;
}
body {
    color: #333;
    font-family: Nunito, sans-serif;
    font-size: 1.3rem;
    text-align: center;
    margin: 0;
    line-height: 1.5;
}

#main {
    background: #eee;
    margin: 30px 8px;
    border-radius: 5px;
    padding: 15px;
}

@media (max-width: 460px) {
    #main {
        margin: 0;
    }
}

h1 {
    font-size: 3rem;
    margin-bottom: 0;
    font-family: Rubik, sans-serif;
}

@media (max-width: 500px) {
    h1 {
        font-size: 3.5rem;
        line-height: 1.2;
    }
}

a {
    color: purple;
}

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

#img-div {
    background: white;
    padding: 30px;
    margin: 0;

}
#img-caption {
    margin: 15px 0 15px 0;
    font-size: 1.5rem;
    
}

@media (max-width: 100px) {
    #img-caption {
        font-size: 1.3rem;
    }
}

ul {
    max-width: 550px;
    margin: auto;
    text-align: left;
    line-height: 1.6;
}

li {
    margin: 16px 0;
}

blockquote {
    font-style: italic;
    margin: auto;
    
}
              
            
!

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