Malek Hoss
Malek Hoss

Reputation: 1

Each .nav-link element should link to a corresponding element on the landing page (has an href with a value of another element's id. e.g. #footer)

I'm currently learning to code on "Free code camp"

<link rel="stylesheet" href="styles.css">

<header id="header">

  <img id="header-img" src="https://cdn.freecodecamp.org/testable-projects-fcc/images/product-landing-page-logo.png" alt=""  </img>

  <nav id="nav-bar" <li> <a class="nav-link" href="#Features">Features</a>
    </li>
    <li> <a class="nav-link" href="#How-It-Works">How It Works</a>
    </li>
    <li> <a class="nav-link" href="#Pricing">Pricing</a>
    </li>

  </nav>
</header>

<video id="video" src="https://youtu.be/y8Yv4pnO7qc" </video>
<form id="form" action="https://www.freecodecamp.com/email-submit" </form>
<input id="email" name="email" placeholder="Enter your email address" type= "email" </input>
<input id="submit" type="submit" </input>

<button id="submit" </button>

</main>

I tried to google the answers, opened all sites available and I still can't find my mistakes.

Upvotes: 0

Views: 2458

Answers (3)

Ankita Thorve
Ankita Thorve

Reputation: 1

<nav id='nav-bar'>
  <a href='#footer' class='nav-link' id='footer'>Features</a>
  <a href='#services' class='nav-link' id='services'>How It works</a>
  <a href='#bottom' class='nav-link' id='bottom'>Pricing</a>
</nav>

Upvotes: 0

Naeem Akhtar
Naeem Akhtar

Reputation: 1270

there are a lot of problems in your code. main problem is you are not creating and closing the tag. img and input tag is self closing with '/>'.

<link rel="stylesheet" href="styles.css">

<header id="header">

  <img id="header-img" src="https://placehold.co/40" alt="" />

  <nav id="nav-bar">
    <ul>
      <li> <a class="nav-link" href="#Features">Features</a>
      </li>
      <li> <a class="nav-link" href="#How-It-Works">How It Works</a>
      </li>
      <li> <a class="nav-link" href="#Pricing">Pricing</a>
      </li>
    </ul>
  </nav>
</header>

<main>
  <video id="video" src="https://youtu.be/y8Yv4pnO7qc"></video>
  <form id="form" action="https://www.freecodecamp.com/email-submit"> </form>
  <input id="email" name="email" placeholder="Enter your email address" type= "email" />
  <input id="submit" type="submit" />

  <button id="submit"> submit</button>

</main>

Upvotes: 0

AnotherFrom2001
AnotherFrom2001

Reputation: 1

I think it could go this way:

    <ul>
        <li> <a class="nav-link" href="#Features">Features</a>
        </li>
        <li> <a class="nav-link" href="#How-It-Works">How It Works</a>
        </li>
        <li> <a class="nav-link" href="#Pricing">Pricing</a>
        </li>
    </ul>

 <!-- And Then, inside your main content there should be items like this: -->

        <h2 id="Features"> </h2>
        <h2 id="How-It-Works"> </h2>
        <h2 id="Pricing"> </h2>

Upvotes: 0

Related Questions