User story / tribute page

This is very confusing. Should an img need a <div> element, cant we use <img src=""> So what I think Im asking here is, what is the purpose of the <div>. Could we use <section> instead of <div>. Or just omit <div> altogether?. Im new here, if that helps at all.

I have edited your post to add backticks around the tags so that they are visible

For the tribute page the requirement is to have a div to group together the image and its description, in your personal projects you can do how you want

1 Like

Thank you for adjusting that. I think my question was; why do we need to use the div tag. Would <section> serve the same purpose?

I just tested it and it will still pass if you use the section element.
But I think a more appropriate element would be the figure tag.

If you read the error message in the test suite it suggests using either the figure or div tag.

Hope that helps!

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