Problem With My Tribute Page Test

Here is the link to my Tribute Page: https://codepen.io/DanWilSE/pen/QWqJwwa
The test is failing 8/10 passing. I see where the trouble is. The formatting is identical to the reference code. I just need another set of eyes to help me find the error. Thanks.

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

When I say this, I did a search of your html (Ctrl+F) for “img-div”. I found:

  <figure id="img-div">
    <img 
      id="image"
      src="https://cdn.radiofrance.fr/s3/cruiser-production/2018/11/47b61d1a-0281-4c5f-8b58-2ab3267bb5fe/600x337_gettyimages-97251875.jpg"
      alt="Duke Ellington poses for a photographer as he sits at his piano"
   />    
 <figcaption id="img caption">
      Duke Ellington sits at the piano as a photographer takes his picture, and he enjoys the moment.
    </figcaption>  

and saw that while the figcaption element exists, it has an invalid id.

</figcaption>    

one of mistakes is in your fig caption id, you are missing - in-between img and caption.
This will sort one of your failing tests

Thank you. It’s funny that something as small as a hyphen can bind up your test on a code.

Generally speaking, text has to match exactly for text matching to work at all. “Find” and “bind” have only one character difference, but are completely different words.

In this particular case, the id without a hyphen would always have been invalid because you cannot have a space in selectors.

Thank you for your input. It is greatly appreciated.

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