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

Tell us what’s happening:

Failed:17. The audio element should have a src attribute pointing to an audio file.

I have a source element and src attribute that points to an audio file and it plays. Not sure what I’m missing on this last step. Please help.

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>Audio and Video Player</h1>
<section>
  <h2>Video</h2>
  <video width="640" controls>
<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 id="" controls loop>
  <source src="https://cdn.freecodecamp.org/curriculum/js-music-player/we-are-going-to-make-it.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/140.0.0.0 Safari/537.36 Edg/140.0.0.0

Challenge Information:

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

it asks for the src to be of the audio element not the source element, a source element is not requested for the audio element in this lab

1 Like

Thank you, Gracias :folded_hands: