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

Tell us what’s happening:

Hi, can somebody help me.
13. Inside the second section element, you should have an h2 element for the title of the song playing.
Failed:15. Below the h2 element, you should have an audio element.
Failed:16. The audio element should have a controls attribute.
Failed:17. The audio element should have a loop attribute.
Failed:18. The audio element should have a src attribute pointing to an audio file.

Thanks a lot

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>HTML Audio and Video Lab</h1>
<section
<h1>Audio</h1>
<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"
  >
  <section>
  <h2>sailing away</h2>
  <audio controls loop
  source src="https://cdn.freecodecamp.org/curriculum/js-music-player/sailing-away.mp3">
</body>
</html>

Your browser information:

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

Challenge Information:

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

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-html-audio-and-video-player/68de40f53fcaf106f51cc20f.md at main · freeCodeCamp/freeCodeCamp · GitHub

The first thing I see in the editor is a red bracket for your opening section tag. Also, check your closing section tag. Is the syntax correct?

Should there be two h1 elements? Should there only be one section element?

I recommend reviewing the user stories in the instructions again to make sure you have implemented them correctly.

Happy coding

Your source tag needs to be a separate HTML element nested inside the video element, not written as part of the opening video tag. That’s what the tests are checking.

Also take another look at your document structure. In your code, the section elements appear outside the body, which makes the HTML invalid and can lead to unexpected behavior.

For the audio portion, carefully reread the user stories. Notice that the requirements for audio and video are not identical, so avoid assuming they should be implemented the same way.

Once you separate the source element correctly and fix the document structure, the related tests should pass.

It seems the most consistent issue here is incomplete HTML elements.

Remember that all HTML elements, except void elements, require both an opening tag and a closing tag. You are missing closing tags for both section elements, the video element, and the audio element.

where are you seeing this???