My Tribute Page Challenge's

Hi I have started to build the tribute page hopefully I am following the user stories and instructions and I hope my code suggests I’m on the right track. Can I have some feedback please to help my development.

Your code so far

 <!DOCTYPE html>

<html>

<head>

<title>"Dr. Norman Borlaug")</title>

<style>

body {

background-color: #EEEEEE;

font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;

}

.container {

display: inline-block;

cursor: pointer;

}

.bar1,

.bar2,

.bar3 {

width: 35px;

height: 5px;

background-color: #333;

margin: 6px 0;

transition: 0.4s;

}

.change .bar1 {

-webkit-transform: rotate(-45deg) translate(-9px, 6px);

transform: rotate(-45deg) translate(-9px, 6px);

}

.change .bar2 {

opacity: 0;

}

.change .bar3 {

-webkit-transform: rotate(45deg) translate(-8px, -8px);

transform: rotate(45deg) translate(-8px, -8px);

}

#tittle {

text-align: center;

color: #333333;

}

p {

text-align: center;

color: #333333;

}

img {

max-width: 100%;

display: block;

height: auto;

margin: 0 auto;

}

#img-div {

background: white;

padding: 10px;

margin: 0;

}

#img-caption {

margin: 15px 0 5px 0;

text-align: center;

}

@media (max-width: 460px) {

#img-caption {

font-size: 1.4rem;

}

}

h3 {

text-align: center;

color: #333333;

}

ul {

max-width: 550px;

margin: 0 auto 50px auto;

text-align: left;

line-height: 1.6;

}

li {

margin: 16px 0;

}

</style>

</head>

<body>

<div class="container" onclick="myFunction(this)">

<div class="bar1"></div>

<div class="bar2"></div>

<div class="bar3"></div>

</div>

<script>

function myFunction(x) {

x.classList.toggle("change");

}

</script>

<div id="tittle">

<h1>Dr. Norman Borlaug</h1>

</div>

<p>The Man who saved a billion lives</p>

<figure id="img-div">

<img id="image" src="trubite.png" alt="Dr. Norman Borlaug seen standing in Mexican wheat field with a group of biologists" />

<figcaption id="img-caption">

Dr. Norman Borlaug, third from the left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.

</figcaption>

</figure>

<section id="tribute-info">

<h3>Here's a time line of Dr. Borlaug's life:</h3>

</section>

<ul>

<li>

<stong>1914</stong> - Born in Cresco, Iowa</li>

<li><strong>1933</strong> - Leaves his family's farm to attend the University of Minnesota, thanks to a Depression era program known as the "National Youth Administration"</li>

<li>

<stong>1935</stong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."</li>

<li>

<stong>1937</stong> - Finishes university and takes a job in the US Forestry Service</li>

<li>

<stong>1938</stong> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.</li>

<li>

<stong>1941</stong> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants, and other applied science.</li>

<li>

<stong>1942</stong> - Receives a Ph.D. in Genetics and Plant Pathology</li>

<li><stong>1944</stong> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent wheat - including different varieties for each major climate on Earth.</li>

<li><stong>1945</stong> - Discovers a way to grown wheat twice each season, doubling wheat yields</li>

<li><stong>1953</stong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.</li>

<li><strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population</li>

<li><strong>1970</strong> - receives the Nobel Peace Prize</li>

<li><strong>1983</strong> - helps seven African countries dramatically increase their maize and sorghum yields</li>

<li><strong>1984</strong> - becomes a distinguished professor at Texas A&M University</li>

<li><strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues that genetically modified crops are the only way we can meet the demand, as we run out of arable land. Says that GM crops are not inherently dangerous because "we've been genetically modifying plants and animals for a long time. Long before we called it science, people were selecting the best breeds."</li>

<li><strong>2009</strong> - dies at the age of 95.</li>

</ul>

</body>

</html>

Challenge: Build a Tribute Page

Link to the challenge:

Hi Owain,

it would be practical if you could create a codepen based on this one, including the test script. https://codepen.io/freeCodeCamp/pen/MJjpwO That way people can easier check out your project and discuss things.

How do I do that?. Do you think my codes on the right track?.

This is my finished code for this challenge will it be possible I can have some feedback please. How can I achieve what you mentioned above in relation to codepen?. Can I please have some assistance.

Dr. Norman Borlaug body { background-color: #EEEEEE; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif; }
    .container {
        display: inline-block;
        cursor: pointer;
    }
    
    .bar1,
    .bar2,
    .bar3 {
        width: 35px;
        height: 5px;
        background-color: #333;
        margin: 6px 0;
        transition: 0.4s;
    }
    
    .change .bar1 {
        -webkit-transform: rotate(-45deg) translate(-9px, 6px);
        transform: rotate(-45deg) translate(-9px, 6px);
    }
    
    .change .bar2 {
        opacity: 0;
    }
    
    .change .bar3 {
        -webkit-transform: rotate(45deg) translate(-8px, -8px);
        transform: rotate(45deg) translate(-8px, -8px);
    }
    
    #tittle {
        text-align: center;
        color: #333333;
    }
    
    p {
        text-align: center;
        color: #333333;
    }
    
    img {
        max-width: 100%;
        display: block;
        height: auto;
        margin: 0 auto;
    }
    
    #img-div {
        background: white;
        padding: 10px;
        margin: 0;
    }
    
    #img-caption {
        margin: 15px 0 5px 0;
        text-align: center;
    }
    
    @media (max-width: 460px) {
        #img-caption {
            font-size: 1.4rem;
        }
    }
    
    h3 {
        text-align: center;
        color: #333333;
    }
    
    ul {
        max-width: 550px;
        margin: 0 auto 50px auto;
        text-align: left;
        line-height: 1.6;
    }
    
    li {
        margin: 16px 0;
    }
    
    blockquote {
        font-style: italic;
        max-width: 545px;
        margin: 0 auto 50px auto;
        text-align: left;
    }
</style>
<div class="container" onclick="myFunction(this)">
    <div class="bar1"></div>
    <div class="bar2"></div>
    <div class="bar3"></div>
</div>

<script>
    function myFunction(x) {
        x.classList.toggle("change");
    }
</script>

<div id="tittle">
    <h1>Dr. Norman Borlaug</h1>
</div>

<p>The Man who saved a billion lives</p>

<figure id="img-div">
    <img id="image" src="trubite.png" alt="Dr. Norman Borlaug seen standing in Mexican wheat field with a group of biologists" />
    <figcaption id="img-caption">
        Dr. Norman Borlaug, third from the left, trains biologists in Mexico on how to increase wheat yields - part of his life-long war on hunger.
    </figcaption>
</figure>

<section id="tribute-info">

    <h3>Here's a time line of Dr. Borlaug's life:</h3>

</section>

<ul>

    <li>
        <strong>1914</strong> - Born in Cresco, Iowa</li>

    <li><strong>1933</strong> - Leaves his family's farm to attend the University of Minnesota, thanks to a Depression era program known as the "National Youth Administration"</li>

    <li>
        <strong>1935</strong> - Has to stop school and save up more money. Works in the Civilian Conservation Corps, helping starving Americans. "I saw how food changed them", he said. "All of this left scars on me."</li>

    <li>
        <strong>1937</strong> - Finishes university and takes a job in the US Forestry Service</li>

    <li>
        <strong>1938</strong> - Marries wife of 69 years Margret Gibson. Gets laid off due to budget cuts. Inspired by Elvin Charles Stakman, he returns to school study under Stakman, who teaches him about breeding pest-resistent plants.</li>

    <li>
        <strong>1941</strong> - Tries to enroll in the military after the Pearl Harbor attack, but is rejected. Instead, the military asked his lab to work on waterproof glue, DDT to control malaria, disinfectants, and other applied science.</li>

    <li>
        <strong>1942</strong> - Receives a Ph.D. in Genetics and Plant Pathology</li>

    <li><strong>1944</strong> - Rejects a 100% salary increase from Dupont, leaves behind his pregnant wife, and flies to Mexico to head a new plant pathology program. Over the next 16 years, his team breeds 6,000 different strains of disease resistent wheat - including different varieties for each major climate on Earth.</li>

    <li><strong>1945</strong> - Discovers a way to grown wheat twice each season, doubling wheat yields</li>

    <li><strong>1953</strong> - crosses a short, sturdy dwarf breed of wheat with a high-yeidling American breed, creating a strain that responds well to fertilizer. It goes on to provide 95% of Mexico's wheat.</li>

    <li><strong>1962</strong> - Visits Delhi and brings his high-yielding strains of wheat to the Indian subcontinent in time to help mitigate mass starvation due to a rapidly expanding population</li>

    <li><strong>1970</strong> - receives the Nobel Peace Prize</li>

    <li><strong>1983</strong> - helps seven African countries dramatically increase their maize and sorghum yields</li>

    <li><strong>1984</strong> - becomes a distinguished professor at Texas A&M University</li>

    <li><strong>2005</strong> - states "we will have to double the world food supply by 2050." Argues that genetically modified crops are the only way we can meet the demand, as we run out of arable land. Says that GM crops are not inherently dangerous because "we've been genetically modifying plants and animals for a long time. Long before we called it science, people were selecting the best breeds."</li>

    <li><strong>2009</strong> - dies at the age of 95.</li>

</ul>

<blockquote cite=&quot;http://news.rediff.com/report/2009/sep/14/pm-pays-tribute-to-father-of-green-revolution-borlaug.htm&quot;>
    <p>
        &quot;Borlaug's life and achievement are testimony to the far-reaching contribution that one man's towering intellect, persistence and scientific vision can make to human peace and progress.&quot;
    </p>
    <cite>-- Indian Prime Minister Manmohan Singh</cite>
</blockquote>
<h3>
  If you have time, you should read more about this incredible human being
  on his
  <a
    id=&quot;tribute-link&quot;
    href=&quot;https://en.wikipedia.org/wiki/Norman_Borlaug&quot;
    target=&quot;_blank&quot;
    >Wikipedia entry</a
  >.
</h3>

If you’d like anyone to review your code it’s better to provide a link to your codepen pen

How can I write what I’ve done in codepen can you please help me?

How were you going to submit the project? codepen, fiddle, repl.it Where ever you have it for submission, post that link so we can see.

If everything you’ve coded is in an editor on your computer we can’t see it.
If you want to use codepen, create an account there. Be sure to verify your email addr with them.
copy/paste the HTML code into the HTML section
copy/paste the CSS code into the CSS section

Hi,

Firstly I would like to thank you for helping me to start codepen. Please find what I’ve started to do for the Tribute Page Challenge I have followed the user stories and the instructions. i hope I/m on the right track with what I’ve done https://codepen.io/owainbennett10/pen/abvwQEx

Glad to help @OwainBennett . Here are some things to revisit;

  • When using codepen it only expects the code you’d put within the <body> </body> element in HTML. (No need to include the body tags). For anything you want to add to <head> click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.

    • The test script is JS. It does not belong in the head element. In codepen you can put it as the first line in the HTML section. (Normally it would be placed just before the closing body tag.)
  • Your page passes 7/10 user stories.

    • The test script should be included, with all tests passing, when you submit your projects.
  • Run your HTML code through the W3C validator.

    • When set up correctly in codepen you can ignore the first warning and first two errors.
    • There are coding errors you need to resolve.
    • Why did you use HTML entities instead just putting in quotes?
  • Review the lesson about giving meaningful text to links.

  • There is no value add to this. I’m not sure why it’s on your page.

<div class="container" onclick="myFunction(this)">
        <div class="bar1"></div>
        <div class="bar2"></div>
        <div class="bar3"></div>
    </div>

    <script>
        function myFunction(x) {
            x.classList.toggle("change");
        }
    </script>

Can you please explain a bit more what I need to do step by step sorry as it will help my understanding. Sorry to be a pain as it will help my confidence

I’m not sure what part needs clarification @OwainBennett. What do you have a question about?

My first question is do I need to remove the body tags from the code pen code?.

Second question what do I need to do with the script code?. Why do I need to run my html through a validator?.

Can you please please explain these for me as this will help my learning and to increase my confidence as I’m lacking in self confidence and belief. Thank you

Codepen provides the boilerplate template for you so in the HTML section you only need to provide the code that would go between the body tags. The code between the body tags is what the browser renders.

The script can be placed as the first line in the HTML section of codepen. If you develop your code in an editor other than codepen it would be placed right before the closing body tag.
When you fork any of the sample projects the script will be there.

I suggest running code through the W3C validator to verify that there are no coding errors. New and experienced coders use a validator.

I have made the changes as you recommended above this is the improved version of what I’ve done hopefully everything will work and I’ve followed the user stories correctly. Can you please give some feedback please?.

Try to go beyond just making the tests pass. Pick a topic you like and change the styling to make it your own. For fun and practice alike …

@OwainBennett, you just cut and pasted the HTML and CSS and JS from the sample page into your pen. There is no original work here to give feedback on.

You can use code pen to run a test to see if there’s any errors.

Hi how can I change the text in the boxes placeholder text black can you please help me with that.

Good Morning, please see the finished Tribute which has passed all the test and I’ve done some styling of the page which I enjoyed doing I hope you like it and think I’m developing my skills. Please use this link to view my Tribute Page https://codepen.io/owainbennett10/pen/abvwQEx