Creating an Audio tag with a controls element

Creating an Audio tag with a controls element
0

#1

Hello everyone,

I’m having trouble with inserting an audio file with HTML5. How do I correctly insert an audio tag with a controls attribute? That seems to be my problem.

The challenge is telling me I need to accomplish the following three tasks:

Your code should have one audio tag.
The audio tag should have the controls attribute.
Your source tag should be inside the audio tags.

Thank you for your help!

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

don’t nest the new audio/source tags inside the paragraph
move it just after the paragraph (after the </p>)


#3

It worked! Thank you so much!