Build a Technical Documentation Page - Error #4

Good day!

I am doing a page programming task, and for a long time I cannot solve the *" User Story #4: Each section element with the class of main-section should also have an id that corresponds with the text of each header contained within it. Any spaces should be replaced with underscores (e.g. The section that contains the header “JavaScript and Java” should have a corresponding id="JavaScript_and_Java" ).

Please tell me what could be the problem?

link project: https://codepen.io/vjusmamh-the-lessful/pen/JjJdaNB

Your browser information:

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

Challenge: Build a Technical Documentation Page

Link to the challenge:

You need to have a <section> each with a class called main-section
you
For example:

<section class="main-section" id="yourChoice">
  <header>Your Heading</header>
  <!--Your Content-->
</section>

The if else statement is causing the problem, if you remove the three dots it should be ok

Hi @NikJeorg ,

I found out about your problem. There are two places you need to change.

  • you should change the spelling of id (Constants and not Constantss) in <section> tag and change the spelling in the corresponding <a> tag(in href).

  • In the If else statement section there should be no ...
    Just keep it as If_else_statement for id and If else statement. for text in <section> tag.

Make sure both the id and text are the same.
I checked with the above scenarios I gave and it is working fine.

All the best to complete your task.

Thanks, I noticed these errors too and fixed them. But for some reason, when checking, it gives the same error :frowning:

You have the 3 dots in 2 different places, you must remove all of them. I did that and your code passed

In the CodePen editor for HTML, only the code between the two body tags should be written. Delete <!DOCTYPE html>, <html></html>, <head><and all tags between></head>, and <body></body> are not necessary.

If you need to put something in the <head> there is top right of the HTML editor a gear symbol for the settings. Click it and put there your <meta> tags etc.

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