Complete the code to add an audio player that plays "song.mp3".
<audio controls> <source src="song.mp3" type="[1]"> Your browser does not support the audio element. </audio>
The type attribute specifies the audio file format. For MP3 files, use audio/mpeg.
Complete the code to add an audio player that automatically starts playing when the page loads.
<audio controls [1]> <source src="music.ogg" type="audio/ogg"> Your browser does not support the audio element. </audio>
loop instead of autoplay.autoplay is a boolean attribute.The autoplay attribute makes the audio start playing automatically when the page loads.
Fix the error in the audio tag to make it valid and playable.
<audio controls> <source src="sound.wav" type="[1]"> Your browser does not support the audio element. </audio>
audio/mp3 for WAV files.The correct MIME type for WAV audio files is audio/wav. Using audio/wave or audio/mp3 is incorrect for WAV files.
Fill both blanks to create an audio player that loops and is muted by default.
<audio controls [1] [2]> <source src="track.mp3" type="audio/mpeg"> Your browser does not support the audio element. </audio>
autoplay with loop.preload instead of muted.The loop attribute makes the audio repeat continuously. The muted attribute starts the audio muted.
Fill all three blanks to create a dictionary comprehension that maps audio file names to their MIME types, but only for files ending with '.mp3'.
audio_types = { [1]: [2] for [3] in files if [1].endswith('.mp3') }This comprehension creates a dictionary where each key is a file name ending with '.mp3' and the value is the MIME type "audio/mpeg".