Product Landing Page - Build a Product Landing Page

Greetings Everyone,

I am nearly finished but I got stuck at the task " Failed:Each .nav-link element should have an href attribute.". Can someone please tell me what have I done wrong?

Thanks for helping.

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html>
  <meta charset="utf-8">
  <link rel="stylesheet" href="styles.css">


<header id="header">
<nav href="header" id="nav-bar">
<nav class="nav-link" href="#submit"></nav-link>
<nav class="nav-link" href="#video"></nav-link>
<nav class="nav-link" href="#email"></nav-link>
</nav>

<img src="https://as2.ftcdn.net/v2/jpg/01/26/48/67/1000_F_126486780_ETD1Cwl1bqqTwKIee8gi6lCzoqWlWSGb.jpg" id="header-img">

<video  id="video" controls />
  <source src="https://www.youtube.com/watch?v=eZ8KYXLEVYA" type="video/mp4">
  Your browser does not support the video tag.
</video>

<form id="form" action="https://www.freecodecamp.com/email-submit">

<input id="email" type="email" placeholder="dad@djd.de" name="email"></input>

<input type="submit" id="submit"><a href="https://www.freecodecamp.com/email-submit"></input>

</form>

</nav>

</header>


  <head>
    
    </head>
    
    <body>
      
      </body>
      
      </html>
/* file: styles.css */
img {
  width: 300px;
  height: 300px;
  display: flex;
}

header {
  position: fixed;
  top: 0px;
}

Your browser information:

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

Challenge: Product Landing Page - Build a Product Landing Page

Link to the challenge:

You seem to have a misunderstanding of how nav is used. You do not use the href in the nav element like you are trying to do. You also shouldnt have that many nav elements

It would be beneficial to give this a read and get a better understanding

2 Likes

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