Product Landing Page 2 test failing even after completing the requirements!

Hello !

I just finished the "Product Landing Page" with all the stories completed but tests 5,6 fail no matter what I try. Look for yourself. Please someone tell me what I could do !?

Here's the codepen pen

so when I test, I see you get 14 out of 16 tests are successful. The first failure is to do with how you defined your nav-links

<li class="nav-link"><a href="#Price">

this is one of the definitions I see on your page.

What they want instead is for the html element that has class nav-link to also have an href.
In your case you have them in two separate elements.
(the test wants a single element).

I will take a look at the rest momentarily… But you can start with the above fixes first.

the second problem is to do with your video element. You currently have it defined like this:

            <iframe id="video" width="560" height="315" src="" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen>

but the test wants it to be defined with a child ‘source’ element rather than the tag ‘src’.
Here’s some sample code that you can emulate:

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.

Notice how they have the “source” child element and not using tag “src”. if you do the same in your code, it will pass the test.

good luck!

1 Like

I fixed that ! Thanks ! Didn’t know it works that way. I only have to figure out the video test now then. thanks again.

just edited my last response. pls take a look above.

I tried it with <video> but it didn’t work so I just used a <section> tag outside and it passed. All tests done ! Thanks. I now learnt a lesson that I need to read the stories in depth. Thanks !!

1 Like

you just need:

    <div id="Howto">
      <iframe src="" frameborder="0" id="video"></iframe>           

then style your iframe width/height as you wish

1 Like

Yes that worked too. Thanks.