Tribute Page: Build a Tribute Page

Hi There,

I am working on the “Tribute Page” certification project, and I’d like to make all the corrections where the tests say I have got my code wrong. I’ve tried doing different kinds of corrections, but I still keep getting the same “failed” messages on some of my code. Please could you kindly advise as to where I’m going wrong? Many thanks and kind regards, Savanah

HMTL:

<html>
  <head>
    <meta content="width=device-width, initial-scale=1.0" name="viewport">
    <meta charset="utf-8">
    <link rel="stylesheet" href="styles.css">
    <title>Charles Haddon Spurgeon</title>
    </head>
    <body>
      <main id="main"> 
        <h1 id="title">Charles Haddon Spurgeon
        </h1>    

      <figure id="img-div">
      <img id"image" 
      src="https://www.princeofpreachers.org/uploads/4/8/6/5/48652749/spurgeon-portrait_orig.jpg" alt="Portrait of Charles Haddon Spurgeon">        
      <figcaption id="img-caption">Charles H. Spurgeon</figcaption>
      </figure>
      
    <section id="tribute-info">
      <h2>Early Life and Conversion (1834–1850)</h2>
        <ul>
          <li>
1834: Born on June 19 in Kelvedon, Essex, England, as the first of 17 children to John and Eliza Spurgeon. </li>

         <li>1835–1841: Lived with his grandparents in Stambourne, where his grandfather, James Spurgeon, was a minister. This period profoundly influenced his spiritual development.</li>

        <li>1841: Returned to his family in Colchester.</li> 

        <li>1849: Authored his first book, Popery Unmasked, a 295-page critique of Roman Catholicism, which won a prize in a writing contest.</li>

        <li>1850: Converted to Christianity on January 6 during a snowstorm at a Primitive Methodist Chapel in Colchester.</li>

        <li>1850: Baptized at Isleham Ferry and joined a Baptist church in Cambridge.</li>
        </ul>

      <h2>Early Ministry and Rise to Prominence (1851–1856)</h2>
        <ul>
          <li>1851: Preached his first sermon in Teversham at the age of 16. </li>

          <li>1851: Became pastor of Waterbeach Baptist Chapel near Cambridge at age 17.</li>

         <li>1854: At 19, appointed pastor of New Park Street Chapel in London, which had a congregation of approximately 200 members.</li> 

        <li>1855: Began publishing his sermons.</li> 

        <li>1856: Married Susannah Thompson on January 8.</li> 

        <li>1856: On September 20, twin sons, Charles and Thomas, were born.</li>

        <li>1856: Surrey Gardens Music Hall disaster occurred on October 19, where a false alarm caused a stampede, resulting in seven deaths. This deeply affected Spurgeon.</li></ul>

    <h2>Establishing the Metropolitan Tabernacle and Expanding Ministry (1857–1867)</h2>
      <ul>
        <li>1857: Founded the Pastors' College to train ministers.</li> 

        <li>1857: Preached to a crowd of 23,654 at the Crystal Palace during a national day of prayer.</li>

        <li>1859: Laid the foundation stone for the Metropolitan Tabernacle near Elephant and Castle in London.</li>

       <li>1861: The Metropolitan Tabernacle, seating approximately 5,600, opened debt-free on March 18.</li>

       <li>1864: Preached a controversial sermon on "Baptismal Regeneration," which sold 350,000 copies.</li>

       <li>1865: Began publishing the monthly magazine The Sword and the Trowel.</li> 

       <li>1866: Founded the Metropolitan Tabernacle Colportage Association to distribute Christian literature.</li>

       <li>1867: Established the Stockwell Orphanage for boys, reflecting his commitment to social welfare.</li></ul> 

  <h2>Later Years and Legacy (1868–1892)</h2>
    <ul>
      <li>1875: His wife, Susannah Spurgeon, initiated the Book Fund, distributing over 200,000 theological books to needy pastors by the time of her death.</li>

     <li>1887: Withdrew from the Baptist Union due to the "Downgrade Controversy," opposing the liberal theological trends of the time.</li>

    <li>1892: Died on January 31 in Menton, France, at the age of 57.</li>

    <li>1892: His funeral procession in London attracted over 100,000 mourners, and 60,000 people visited the Metropolitan Tabernacle to pay their respects.</li></ul>

   <h2>Enduring Influence
Publications:</h2>
     <p>Spurgeon's sermons were published weekly and eventually compiled into 63 volumes, making it the largest set of books by a single author in Christian history. 
Desiring God</p>

<h2>Institutions:</h2>
  <p>The Pastors' College he founded continues today as Spurgeon's College, training ministers worldwide.</p> 

<h2>Social Work:</h2>
  <p>The Stockwell Orphanage evolved into Spurgeons, a charity dedicated to supporting vulnerable children and families.</p>

<h2>Legacy:</h2>
  <p>Known as the "Prince of Preachers," Spurgeon's theological writings and sermons remain influential in evangelical circles, emphasizing the authority of Scripture and the necessity of personal conversion.</p>
      </section>
      <p>Visit the <a id="tribute-link" target="_blank" href="https://www.princeofpreachers.org/">Charles H. Spurgeon</a> website for more information</p>
      </main>
      </body>
  </html>```

**CSS**
#image {max-width: 100%;

height: auto;

text-align: center}

#title {text-align: center; font-family: Georgia, serif;

color: #ffffff;

text-shadow: 10px -5px 10px;}

#img-caption {font-size: 1rem;

font-family: Verdana;

font-style: italic;

color: #ffffff}

h2 {font-family: Georgia, serif;color: #ffffff}

#tribute-info {margin: 20px 0;}

#tribute-link {color: rgb(127, 127, 225)}

#tribute-link:hover {text-decoration: underline}

img {display: block; padding: 10px;

border: 10px ridge #ffffff}

body {background-color: #787878; color: #ffffff;

font-family: Verdana}

#img-div {text-align: center}```

Please edit your post. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

Thank you so much! I’ve made the edited post with the backticks.

What is the first test that is failing? Is there any feedback or hint?

Can you share the part of your code that fulfills the test requirement?

Sure, thank you so much!

This is the feedback I’ve received so far is below:

    1. You should have a main element with an id of main.
  • Failed:2. Your #img-div, #image, #img-caption, #tribute-info, and #tribute-link should all be descendants of #main.

  • Passed:3. You should have an element with an id of title.

  • Passed:4. Your #title should not be empty.

  • Passed:5. You should have a figure or div element with an id of img-div.

  • Failed:6. You should have an img element with an id of image.

  • Failed:7. Your #image should be a descendant of #img-div.

  • Passed:8. You should have a figcaption or div element with an id of img-caption.

  • Passed:9. Your #img-caption should be a descendant of #img-div.

  • Passed:10. Your #img-caption should not be empty.

  • Passed:11. You should have an element with an id of tribute-info.

  • Passed:12. Your #tribute-info should not be empty.

  • Passed:13. You should have an a element with an id of tribute-link.

  • Passed:14. Your #tribute-link should have an href attribute and value.

  • Passed:15. Your #tribute-link should have a target attribute set to _blank.

  • Failed:16. Your img element should have a display of block.

  • Failed:17. Your #image should have a max-width of 100%.

  • Failed:18. Your #image should have a height of auto.

  • Failed:19. Your #image should be centered within its parent.

Many thanks again

Thanks for that but I only asked about the first test. Can you answer the questions that I asked?

The part of the code that fulfills the test requirement is as follows:

      <img id"image" 
      src="https://www.princeofpreachers.org/uploads/4/8/6/5/48652749/spurgeon-portrait_orig.jpg" alt="Portrait of Charles Haddon Spurgeon">        
      <figcaption id="img-caption">Charles H. Spurgeon</figcaption>
      </figure>

Look at where you main element begins and where it ends. That’s a lot of things in the main element, is all that supposed to be in there? Seems kind of strange for everything to be “main”

Look at the syntax here:

You have other elements with the id syntax correct, check those for guidance.

It’s hard to comment further without a link to the instructions.

Sure, thank you so much for your kind help, it’s much appreciated!

1 Like