hyperlink - How do I /actually/ link mp3 into html? -


i've started learning how use this; unsure on how linking audio files script works. i'm trying have small audio player.

<audio controls width="100" height="100">   <source src="somethin.mp3" type="audio/mp3">   <!-- fallback older browsers -->   browser doesn't support html5 audio </audio> 

it depends on file location. script above put somethin.mp3 in same location html file. if want put in sub folder (say folder containing .mp3 called audio) <source src="audio/somethin.mp3" type="audio/mp3">. if in second sub folder (say second called html_sound) <source src="audio/html_sound/somethin.mp3" type="audio/mp3">. if want go 1 dictionary use <source src="../somethin.mp3" type="audio/mp3">. 2 dictionaries <source src="../../somethin.mp3" type="audio/mp3"> , on.

just copy dictionary name go folder , use ../ go 1 folder.

also code not end </audio> tag (it must) , it's type="audio/mpeg" not type="audio/mp3".

best test script in chrome, edge or internet explorer (if have windows) ok not test in firefox or opera supports .ogg files (i know w3schools says need outdated browser , not work).

you might want check out.

if have done links or images same.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -