Tribute page - my first project - one issue I can't solve, please help!

Hello,

Thank you in advance for your help / feedback. I have just completed my first project - the tribute page - but for some reason it won’t pass the test number 5 even though I think I’ve done what is required. I have pasted the part that isn’t passing below.

" 5. 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”."

My tribute page code pen - https://codepen.io/richardanlezarklee/full/ExaLBYP

As this is my first project I really can’t see what the issue is - any help would be massively appreciated as I keep reading over the same code for hours!

Many thanks

Richard

1 Like

Hey bro… in my opinion you are using simple img element to place the image on your tribute page. You should use the figure element instead of img element.
The figure element will allow you to use an img element along with a figcaption element… this figcaption element can be used to write a caption for the picture.

Edit:
I just viewed your HTML code at code pen and here is the problem:
You have written following code:

<figcaption id="image-caption"> Cup of Espresso </figcaption>

The problem is with id name. You have to write img-caption instead of writing image-caption. :slight_smile: :wink:

Jeez - what a simple mistake! Thank you. I’ve spent ages looking at that :slight_smile:

Richard

Best of luck :slight_smile: happy coding…

Hi @richardanlezarklee, your page looks good. Some things to revisit;

  • On using codepen. codepen only expects the code you’d put within the <body> </body> tags 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.
  • Use external CSS for styling instead of using internal CSS
  • Don’t use the <br> element to force spacing. Use margin and/or padding in CSS instead

Thank you very much for the tips.

Richard

Your content helped me a lot to take my doubts, thank you very much. mywegmansconnect