Insterting an audio file in HTML

Insterting an audio file in HTML
0

#1

Hey everyone,

I’ve been playing around with this for about a half hour, researching, and I don’t understand what I’m doing wrong. Hopefully it’s just a couple of small fixes:

Requirements:
Your code should have one audio tag.
Passed
Make sure your audio element has a closing tag.
The audio tag should have the controls attribute.
Passed
Your code should have one source tag.
Your source tag should be inside the audio tags.
Passed
The value for the src attribute on the source tag should match the link in the instructions exactly.
Passed
Your code should include a type attribute on the source tag with a value of audio/mpeg.

Your code so far


<body>
  <header>
    <h1>Real Coding Ninjas</h1>
  </header>
  <main>
    <p 
    <audio id="" controls>
      <source src= "https://s3.amazonaws.com/freecodecamp/screen-reader.mp3"
      type= "audio/mpeg"
      </audio>

      
    
    
    A sound clip of Zersiax's screen reader in action.</p>
    
    
    
  </main>
</body>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:60.0) Gecko/20100101 Firefox/60.0.

Link to the challenge:
https://learn.freecodecamp.org/responsive-web-design/applied-accessibility/improve-accessibility-of-audio-content-with-the-audio-element


#2

Hey look You code is right but Please check carefully it is missing one closing tag of source tag

<source src="" type="" />

#3

Thank you so much! It worked!