My tribute page feedback and last test score. corrected the pen link

Looking for some feedback on my first pen and a little help getting past the image test. not sure how to get past it. tried several things and can’t figure it out. https://codepen.io/Eborbolla/pen/jOVQaYP

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

Hey, looks like you linked the default pen and not your own.

For the error since the code isn’t here I can only take a guess: it is possible you need to set display:block

The error messages given by the test are extremely helpful and if you haven’t been, try reading the messages beyond the first line.

Corrected the pen link. sorry about that. any thoughts or help would be appreciated

So I see a few syntax errors:

  1. the alt attribute belongs in <img>
  2. <fig-caption> is not a valid tag

For the error message:
your figcaption does not have the required id of “img-caption”

Thank you! That did the trick.

Welcome to the forums @BearMechanic. Your page looks good. Some things to revisit;

  • Codepen provides the boilerplate for you. It only expects the code you’d put within the body element in the HTML editor. (No need to include the body tags). For anything you want to add to the <head> element click on the ‘Settings’ button, then HTML and add it into the ‘Stuff for <head>’ box.
    • For instance links to fonts go in the box labeled ‘Stuff for <head>’
  • Run your HTML code through the W3C validator.
    • There are HTML coding errors you should be aware of and address.
    • Since copy/paste from codepen you can ignore the first warning and first two errors.
  • Codepen provides validators for HTML, CSS and JS. Click on the chevron in the upper right of each section and then click on the respective ‘Analyze’ link.
    • The one for CSS is good. Use it and address the issue(s).
    • (The one for HTML misses things which is why I recommend W3C)
  • Do not use the <br> element to force line breaks or spacing. That’s what CSS is for.
  • Accessibility is about being accessible to all users. Review the giving meaningful text to links lesson. For a more thorough explanation read Web Accessibility in Mind.
    • wiki page” is not accessible

One a side note;
You’ve been given the answer but in the future, when tests fail click the red button to see which test(s) are failing and text to help you correct the issue.

  • Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

Thank you very much for your post and your help. I will take your advice and reference sources to get better. I appreciate how thorough it was.

1 Like