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

              
                
<style>
    @import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');
</style>

<head>
    <meta charset="utf-8">

    <title>Tribute page of Nelson Mandela</title>
    <link rel="stylesheet" href="styles.css">

</head>

<body>
    <div class="top-background">
      <header id="title">
        <h1>Nelson Mandela</h1>
        <h2 id="description"><i>The greatest leader of the 20th century</i></h2>
      </header>
    </div>


    <hr class="breakline1">
    <main id="main">

        <div class="profile">
            <div class="white-text profile-container">
                <div class="profile-info">                
                   <div class="name-birth">
                       <h2 class="name">Nelson Mandela</h2>
                       
                       <h3 class="birth">Year: 1918-2013</h3>
                  </div>
                  <div class="quote-container">
                      <p class= "white-text" id="quote-text"><i>"No one is born hating another person because of the color of his skin, or his background, or his religion. People must learn to hate, and if they can learn to hate, they can be taught to love, for love comes more naturally to the human heart than its opposite. Forgiveness liberates the soul. It removes fear. That is why it is such a powerful weapon."</i>
                    </p>
                  </div>
              </div>

              <div class="profile-picture-container">
                  <img id="profile-picture" src="https://res.cloudinary.com/dk-find-out/image/upload/q_80,w_1920,f_auto/A-Corbis-TL007642_brkxd1.jpg" alt=""> 
              </div>
          </div>
       </div>


        <section id="tribute-info">

            <h2>Biography</h2>
            <p>Nelson Mandel was the first democratically elected president of South Africa. He is considered to be one
                of the most influential and inspiring leader of the 20th century for his contribution in fostering peaceful reconciliation by being a forefronter of the anti-aparthied movement.</p>

                <figure id="img-div">
                  <img id="image" src="https://resources.world.rugby/worldrugby/photo/2015/07/14/8636cd3d-36a1-4095-8c39-7a7e9ab2de14/GettyImages-77352327.jpg" alt="Nelson Mandela shaking hands with Afrikan player at the 1995 Rugby World Cup">
                 
                     <figcaption id="img-caption">Nelson Mandela at the 1995 Rugby World Cup shaking hand of Francois Pienaar, the captain of South African Rugby Player</figcaption>

                </figure>

            <p>
                Nelson was able to reunite very polarised nation through the act of forgiveness rather than seeking
                retaliation or revenage. He used rugby as a vehicle to overcome the aparthied segregation and racism even though the rugby was symbolised as the sports of Afrikans exclusively. Nelson's gesture of forgiveness by endorsing rugby players, demonstrates that one must transcend from the past legacy instead of acting on fear - to forgive than to avenage. His great leadership was recognised internationally and Nelson was awarded the Nobel Peace Prize in 1993.  
                
            </p>

        </section>


        <section id="education">
            <p></p>
        </section>
        <section id="life-event">
            <p></p>
        </section>


        <section class="Impacts-on-society">
           <h3>Impacts on Society</h3>
            <ul>
                <li>Mandela was able to lead a successful transition from aparthied to a multircal democracy.</li>
                <li>Won the Nobel Prize for Peace in 1993 for playing the leading role in ending the Apartheid.</li>
                <li>Elected as the first black president of South Africa, serving from 1994 to 1999.</li>
                <li>Focused on the reconciliation of Afrikans and native South Africans during his presidency</li>
                <li>Mandela founded the Nelson Mandela Children's Fund to help the orphans of the AIDS crisis in 1995.</li>
                <li>After his five years of presidency, Mandela continuted to advcoate for causes such as inequality and AIDS crisis in rural parts of South Africa.</li>
            </ul>
        </section>

        <hr class="breakline2">

        <section class="final-quote">
            <blockquote>
                <p><i>"Forgiveness liberates the soul. It removes fear. That is why it is such a powerful weapon"</i></p>
                <p class="quoteby">- Quote by Nelson Mandela -</p> 
            </blockquote>
        </section>

        

        <section class="conclusion white-text">
            <p>Mandela was a selfless individual and leader who have significantly contributed to the society that his actions have altered the course of the 21st history. His legacy and achievement should be commemorated for enacting changes to the society in which we are living now.</p>
        </section>

        <section class="external-link">
            <p>Click here <a href="https://www.nelsonmandela.org/content/page/biography" alt="external link to Nelson Mandela" id="tribute-link" target="_blank"><i>to find more information about Nelson Mandela.</i></a></p>
        </section>

    </main>


    <div class="top-and-bottom">
      <footer>
          <p class="white-text">&copy; Copy and right by Soyeon Jang 2022</p>
        

      </footer>
    </div>
</body>



              
            
!

CSS

              
                body {
    font-family: 'Titillium Web', sans-serif;
    font-size: 18px;

}

figcaption {
    font-size: 14px;
    text-align: center;
}

.white-text {
    color: rgba(255, 255, 255, 0.932);
}

@media (min-width: 1000px) {
    figure  {
        padding-left: 10vw;
        padding-right: 10vw;
        

    }
}

@media (max-width: 800px){
    body {
        font-size: 16px;
    }
    
    #title h1 {
        font-size: 3em;
    }
    
    #description {
        font-size: 1.2em;
    }
    .profile {
        padding-top: 0vh;
    }
    .profile-container {
        flex-wrap: wrap-reverse;
        padding-top: 0vh;
        margin-top: 0vh;
        padding-left: 3vw;
        padding-right: 3vw;
    }
    .profile-picture-container {
        padding: 8vmin;
    }
    
    
}

@media (max-width: 350px) {
    body {
        font-size: 5vmin;
    }
    #title h1 {
        font-size: 2.4em;
    }
    
    #description {
        font-size: 1.0em;
    }

    #quote-text {
        font-size: 14px;
    }

    .profile-container {
        flex-wrap: wrap-reverse;
        padding-top: 0vh;
        padding-left: 3vw;
        padding-right: 3vw;
    }
    .profile-picture-container {
        padding: 10vmin;
    }
    .quoteby {
        font-size: 4vmin !important;
    }
    #tribute-info h2, .Impacts-on-society h3 {
        font-size: 1.5em !important;

    }
    

}



header {
    color: rgba(255, 255, 255, 0.932);
}

header h1 {
    font-size: 4.5em;
    
    text-align: center;
    margin-bottom: -1vh;
}

header h2 {
    font-size: 1.5em;
    font-weight: 500;
    text-align: center;
    padding-bottom: 3vh;
}

.breakline1 {
    display: flex;
    margin: 0vh;
    border-style: block;
    border-width: 10px;
}

.top-background {
    background-color:rgb(18, 24, 18);
    padding-top: 3vh;
    padding-bottom: 3vh;
}
.profile{
    background-color: rgb(18, 24, 18);
    padding-bottom: 4vh;

}

.profile-container {
    display: flex;
    align-items: center;

}

.profile-info {

    padding-left: 2vw;
    padding-right: 2vw;
    margin: 2vmin;
    flex: 1 1 70vw;
   
}

.name {
    font-size: 2em;
}

.birth {
    font-size: 1.5em;
}

.name-birth {
    text-align: center;
    

}

.quote-container {
    display: flex; 
    flex-direction: column;
    justify-content: center;
    font-size: 1.05em;
    text-align: center;
}


.profile-picture-container { 
    flex: 1 1 60vw;
    width: 40vw;
    margin: 7vw;
}

 #profile-picture {
    display: flex;
    position: relative;
    object-fit: contain;
    max-width:  100%;
    height: auto;
    align-content: center;
    border-radius: 30%;
}


#tribute-info {
    padding-top: 3vmin;
    padding-bottom: 3vmin;
    padding-left: 2vw;
    padding-right: 2vw;
}

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



figure {
    padding-top: 2vh;
    padding-bottom: 2vh;
}

#img-caption {
  padding-top: 1vh;
}

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

.Impacts-on-society {
    background-color: rgba(1, 12, 0, 0.904);
    color: rgba(255, 255, 255, 0.932);
    width: auto;
    box-sizing:border-box;
    padding: 0.1vmin 2vmin 5vmin 2vmin;
}

.Impacts-on-society h3 {
    font-size: 30px;
    margin-left: 2vw;
}


.breakline2 {
    display: block;
    margin: 0vw;
    border-width: 10px;
    border-style: inset;
}

.final-quote{
    padding-top: 5vh;
    padding-bottom: 5vh;
}

blockquote p {
    text-align: center; 
    margin-left: 10vw;
    margin-right: 10vw;

}

.quoteby {
    font-size: 14px;
}

.conclusion {
    padding: 2vmax 0vmax 2vmax 0vmax;
    background: linear-gradient(180deg, rgba(1, 12, 0, 0.904), rgba(1, 12, 0, 0.904));
}
.conclusion p {
    padding: 0vmin 4vmin 0vmin 4vmin;
}

.external-link {
    padding-top: 3vmin;
    padding-bottom: 2vmin;
    margin-left: 2vmin;
}

.external-link p i {
    font-weight: 550;
}

a:link { 
    color: rgb(29, 36, 105);

}

a:visited {
    color: rgba(109, 83, 28, 0.89);
}

footer {
    background-color: rgba(1, 1, 29, 0.89);
}

footer p {
    text-align: center;
}

.top-and-bottom {
    background-color: rgba(1, 1, 29, 0.89);
    padding: 0vmin 0vmin 10vmin 0vmin
}
              
            
!

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