Technical Documentation Page project - test #5 error

So I’ve been stuck in this project for 30 minutes - test #5
It says each element inside of section tag (main section class) should have an ID put to it
But I’m not sure what I’m doing wrong here.

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

Each ‘main-section’ should have an id attribute : expected false to equal true
AssertionError: Each ‘main-section’ should have an id attribute : expected false to equal true
at Proxy.c (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:549:1889)
at Proxy.l (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:431:130)
at Function.n.strictEqual (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:574:655)
at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:657:145570
at Array.map ()
at a. (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:657:145537)
at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:38668
at i.g.run (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:38963)
at N.runTest (https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:45686)
at https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js:598:46651

The code

https://codepen.io/maz12211/pen/LYxrdbb
(If the link doesn't work try copy & pasting the URL)

Hey there,

It looks like you applied the id attribute to your header elements instead of your section elements.

Each header, will have content (text) that describes the topic, then in your section element, you need to add

id="content (text)"

if your header has multiple words then you need to replace every space with underline/underscore.

repeat this until all your sections have the correct id.

In other words, your basically adding a connection between the header and section. for each section and header. so you need to add 5 connections.

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