#video should be an <iframe> or <video> element

I can’t get this to pass, video shows up but I get this error. What am I doing wrong or missing?

Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:90.0) Gecko/20100101 Firefox/90.0

Challenge: Build a Product Landing Page

Link to the challenge:
https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-product-landing-pagehttps://codepen.io/solarhacker420/pen/OJmaBEo

you have two divs with id=“video” you can remove one and what the error says is I can watch an >embedded product video with id="video". <" the id should be on the video not on the div.

As said, the id="video" has to be on the iframe. Also, ids should be unique so they should not be applied to multiple elements.

Where in the Iframe? Cause I tried and the video would disappear

This is what you have now.

<div id="video" class="wrapper">
  <div id="video" class="videowrapper">
    <iframe src="https://www.youtube.com/embed/aVv5aA8ZeDk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </div>
</div>

You need to remove the two duplicate ids from the divs and add it to the iframe element.

<div class="wrapper">
  <div class="videowrapper">
    <iframe id="video" src="https://www.youtube.com/embed/aVv5aA8ZeDk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
  </div>
</div>
1 Like

hey it worked thanks man

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