Tribute Page - Build a Tribute Page

I am struggling to create the image display block element.
Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
   <title>Tribute Page</title>
   </head>
   <main id='main'>
     <h1 id='title'>Dr. Norman Borlaug</h1>
     <p>The man who saved a billion lives</p>
     <figure id='img-div'>
       <img id='image' src="https://cdn.freecodecamp.org/testable-projects-fcc/images/tribute-page-main-image.jpg" 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 id='headline'>Here's a timeline of Dr. Borlaug's life:</h3>
         <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/Norman_Borlaug' target='_blank'>Wikipedia entry</a>
         </h3>
         </section>
         </main>
         </body>
         </html>
/* file: styles.css */
image {
  display: block;
}

body {
  display: block;
}

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36

Challenge: Tribute Page - Build a Tribute Page

Link to the challenge:

This is targeting the image element, which doesn’t exist in HTML and you aren’t using in your HTML. If you are trying to target the img element in your HTML with the id of image then you need to put a # before the id name to use the id selector.

I’ve used the # and still doesn’t work

Well, that wasn’t your only problem. But it was an essential first step to get it working.

Another essential first step:

Note: Be sure to add <link rel="stylesheet" href="styles.css"> in your HTML to link your stylesheet and apply your CSS”

After you fix this you will still have tests that fail. You just need to go through them one by one and make the necessary fixes.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.