Technical Documentation Page - Build a Technical Documentation Page

Tell us what’s happening:

Failed: Each .main-section should have an id that matches the text of its first child, having any spaces in the child’s text replaced with underscores (_) for the id’s.

Each .nav-link should have an href attribute that links to its corresponding .main-section (e.g. If you click on a .nav-link element that contains the text “Hello world”, the page navigates to a section element with that id).

i don’t know how to solve this two i have been trying but its not been possible

Your code so far

WARNING

The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.

You will need to take an additional step here so the code you wrote presents in an easy to read format.

Please copy/paste all the editor code showing in the challenge from where you just linked.

R<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="styles.css">
    <title>Technical Page</title>
</head>
<body>
    <div class="container">
        <nav id="navbar">
            <header>Learning to program</header>
            
            <ul>
                <li><a class="nav-link" href="#welcome">Welcome</a></li>
                <li><a class="nav-link" href="#learning-to-code">Learning to code</a></li>
                <li><a class="nav-link" href="#easies-programming-languague">Easiest programming languague</a></li>
                <li><a class="nav-link" href="#why-programming">Why programming</a></li>
                <li><a class="nav-link" href="#programming-languagues">Programming languages</a></li>
                <li><a class="nav-link" href="#coding-sample">Example of coding</a></li>
            </ul>
        </nav>
        <main id="main-doc">

            <section class="main-section" id="welcome">
                <header id="welcome">welcome</header>
                <p>Pellentesque at malesuada ipsum. Aenean pretium, elit faucibus volutpat varius, urna sapien mattis ante, sed volutpat mi tortor eget nisi. Suspendisse potenti. Donec placerat orci augue, ut dignissim quam pharetra nec.</p>
            </section>

            <section class="main-section" id="learning-to-code">
                <header id="learning-to-code">learning to code</header>
                <p>Here are some tips to make coding interesting</p>
                <ul>
                    <li>First try to focus, try to code for atleast and hour without getting distractect</li>
                    <li>Always learn new things, be courius </li>
                    <li>Find a comunity, so they can support you when you feel like you can't.</li>
                </ul>
            </section>

            <section class="main-section" id="easiest_programming_languague">
                <header id="easies-programming-languague">easiest programming languague</header>
                <p>The programming language to learn when you are starting is javascript because its quite easy to learn and also to understand its logic (maybe).</p>
                <p>Also many people says that python is easy to learn too, but i don't think so because it is used in very complex fields like machine learning that's what i think . 
            </section>

            <section class="main-section" id="why-programming">
                <header id="why-programming">why programming</header>
                <p>I think the world is changing when it comes to tech, because i think at some point programming will be very useful like, being able to read (thats my point of view)</p>
                <p>Programming can help you develop your brain making you smart, because when you are coding you face many problems that you need to fix, so that makes your brain grow.</p>
            
            </section>

            <section class="main-section" id="programming-languagues">
                <header id="programming-languagues"> programming languages</header>
                <p> here are one of the most popular programming languagues</p>
                <ul>
                    <li>JavaScript</li>
                    <li>Python</li>
                    <li>Java</li>
                    <li>C#</li>
                    <li>Ruby</li>
                    <li>Swift</li>
                </ul>
            </section>
            <section class="main-section" id="example-of-coding">
                <header id="coding-sample">example of coding</header>
                <p>JavaScript</p>
                <code id="code">let greeting = "Hello, World!";
console.log(greeting);</code>
                <p>Python</p>
                <code id="code">greeting = "Hello, World!"
print(greeting)</code>
                 <p>Java</p>
                <code id="code">public class HelloWorld {
    public static void main(String[] args) {
        String greeting = "Hello, World!";
        System.out.println(greeting);</code>
                <p>C#</p>
                <code id="code">class HelloWorld
{
    static void Main()
    {
        string greeting = "Hello, World!";
        Console.WriteLine(greeting);
    }
}</code>
             <p>Ruby</p>
                <code id="code">greeting = "Hello, World!"
puts greeting</code>
              <p>Swift</p>
                <code id="code">let greeting = "Hello, World!"
print(greeting)</code>
            </section>

        </main>
    </div>
    
</body>
</html>

### Your browser information:

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

### Challenge Information:
Technical Documentation Page - Build a Technical Documentation Page
https://www.freecodecamp.org/learn/2022/responsive-web-design/build-a-technical-documentation-page-project/build-a-technical-documentation-page

Welcome to fCC Forum @josuee_30 !

I notice that the nav-links and sections have hyphens, instead of underscores.

For nav-links the hyphen should not be used in multiple words. It should be underscores.

You may wish to start there to make changes.

You are making good progress. Keep it up.

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