How to caption - build a tribute page

Tell us what’s happening:
For the tribute page challenge, I have decided on Vikings as the topic. The code is likely to be messy but I’m having a little trouble with this part of the challenge:

User Story #5: Within the img-div element, I should see an element with a corresponding id="img-caption" that contains textual content describing the image shown in img-div .

I’ve inserted the #img-caption into CSS however it is not being recognised in HTML. It seems to work when using a p tag or h3 tag, just not in a caption tag.

Your code so far
https://codepen.io/martay777/pen/YzNXmwv

Your browser information:

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

Challenge: Build a Tribute Page

Link to the challenge:

The caption element is for use within a table.
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
The story does not ask for you to use a caption element. You can use a p tag, as long as it contains the correct id.

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