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

Tell us what’s happening:

Please i need from 9 to 12, i need to know what i’m getting wrong with the element

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>Example Project</h1>
<section>
  <h2>Video playing</h2>
  <video
  src="https://cdn.freecodecamp.org/curriculum/labs/What is the map method and how does it work.mp4"
  controls
  width="640"
  <source src="video.mp4" type="video/mp4">
  >
  </video>
  </section>
  <section>
    <h2>Song playing</h2>
    <audio
    scr="https://cdn.freecodecamp.org/curriculum/js-music-player/sailing-away.mp3"
    loop
    controls
    <source src="audio.mp3" type="audio/mpeg">
    >
    </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

Your source element should be inside the video element. This means that it should be between the opening and closing tags of the element, rather than inside the opening tag. Also, the src attribute should not be in the video element but in the source element instead.

The audio element, on the other hand, should NOT have a source element nested inside it. Instead, the src attribute should be applied directly to the audio element only (ensuring that the attribute name is also spelled correctly).

1 Like

i moved the source element into the video element like you said and all my codes passed ..

Thank you!

1 Like