Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

Tell us what’s happening:

I cannot pass for step 9-12, can help me to check my code? I do the source and type but still cannot pass.

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>HTML Audio and Video Lab</title>
</head>
<body>
  <h1>Video and Audio</h1>
  <section>
    <h2>Map Method</h2>
    <video 
    controls 
    width="640" 
    source src="https://cdn.freecodecamp.org/curriculum/labs/what-is-the-map-method-and-how-does-it-work.mp4" type="video/mp4"/>
    </video>
  </section> 

  <section>
    <h2>We are going to make it</h2>
    <audio
    controls
    loop
    src="https://cdn.freecodecamp.org/curriculum/js-music-player/we-are-going-to-make-it.mp3">
    </audio>
  </section>   
</body>
</html>

Your browser information:

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

Challenge Information:

Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

Hello and welcome to the forum @xuhuan !

Good attempt!

It appears the source element has been mistakenly added to the opening video tag.

I think it should be nested between the video tags.

Example: <video><source></source><video>

I hope this helps you!

Keep up the good progress! :slightly_smiling_face:

1 Like