Technical Documentation Page (and help with Content #4)

Hello,

I am a bit stuck on Content #4 which is:

> ## Each element with the class of “main-section” should also have an id comprised of the innerText contained within it, with underscores in place of spaces. The id may include special characters if there are special characters in the respective innerText. (e.g. The that contains the header, “JavaScript & Java”, should have a corresponding id=“JavaScript_&_Java”).
> Blockquote

I’ve gone through all the section id’s and compared to the one in the nav and have not been able to figure out why this is failing.
Thanking you in advance for a fresh set of eyes.

https://codepen.io/Katerpillar/pen/eYROEqO

Hey there, your page looks great.

Not absolutely sure about this, but I think you just need to change all your section IDs and instead of writing id=“introduction”, you should write id=“Introduction” to make the user story pass.

I hope this helped,
Have a nice day

Hi,

Thank-you :slight_smile:
Unfortunately your solution did not work.
I am not sure what this line in the error message means.

"HELLO_WORLD",DECLARING_VARIABLES,IF...ELSE_STATEMENT,FUNCTION_DECLARATIONS : expected 4 to equal 0

Okay so I didn’t spot it at first, but I think you should

  • get rid of the quotes around Hello World in your nav bar, also the ones in h2 tag
  • change your href so that they’re the same as what’s inside your nav-link
  • change id=“declaration” to id=“declaring_variables”
  • same goes for id=“if_else” you’re missing the “…” and statement that are in your h2 tag
  • same goes for id=“functions”, your h2 is “function declarations”

I hope this helped, I’m also a rookie in all this ^^

For the sake of the validation that did the trick, however in real life, I’d hope I wouldn’t have to change the title of my section to accommodate an auto grader or use a strange id that includes “…”.
I can see the benefit in adding an aria-labelledby that matches the actual title (in the h2) of the section for accessibility though, which the exercise did bring to light.

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