Help with checking tribute test

Hi , I am trying to complete the tribute page and keep getting 9 out of 10. Any help would be greatly appreciated .

My attempt so far is as follows

Your browser information:

User Agent is: Mozilla/5.0 (iPad; CPU OS 12_5_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/12.1.2 Mobile/15E148 Safari/604.1.

Challenge: Build a Tribute Page

Link to the challenge:

If you look at the error itself, it tells you what is going on:

  1. Within the "img-div" element, I should see either a <figcaption> or <div> element with a corresponding id="img-caption" that contains textual content describing the image shown in "img-div".

So that’s telling you , it’s looking for either a div or figcaption with the id img-caption. You have that id on an h2 tag, instead.

There are one of two ways to fix this. First, you could simply change that h2 to a div, and it’s fixed.

Option two, you could use Semantic HTML. Change the img-div from being a div to being something like a div:

<figure id="img-div">
  <img src="<!--your images source -->" />
  <figcaption id="img-caption">The text for the image caption.</figcaption>

It won’t cause more problems, it will still work like a div, but it’s more descriptive of the intent there. The image and its caption are treated as a discrete bit of data, within a figure tag.

Thank you snowmonkey that was so helpfull

1 Like

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