HTML elements behind audio tag not displayed -


i have following code:

    <div>text</div>            <input id="audio_file" type="file" accept="audio/*" />      <audio id="audio_player" />        <div>text</div>        

however div before not after audio tag rendered. how can fix this?

you need close audio correcty <audio></audio> because it isn't self closing tag.

solution

<div>text</div>        <input id="audio_file" type="file" accept="audio/*" />  <audio id="audio_player"></audio>    <div>text</div>

explanation

inside audio tag insert source, track or append text conent.
text content displayed if browser dosn't support audio api.

<!-- mdn webdocs --> <audio controls="controls">   browser not support <code>audio</code> element.   <source src="foo.wav" type="audio/wav"> </audio> 

Comments

Popular posts from this blog

What is happening when Matlab is starting a "parallel pool"? -

angular - DownloadURL return null in below code -

php - Cannot override Laravel Spark authentication with own implementation -