+ 9
How can I add a music to a web page?
25 ответов
+ 10
Check it out
https://code.sololearn.com/W8aGj9AU79Ra/?ref=app
+ 7
By using
The mighty search bar👇
https://www.sololearn.com/discuss/2346242/?ref=app
https://www.sololearn.com/discuss/395717/?ref=app
https://www.sololearn.com/discuss/2292545/?ref=app
https://www.sololearn.com/discuss/2390835/?ref=app
https://www.sololearn.com/discuss/1235483/?ref=app
https://www.sololearn.com/discuss/1727696/?ref=app
https://www.sololearn.com/discuss/165737/?ref=app
https://www.sololearn.com/discuss/2416447/?ref=app
https://www.sololearn.com/discuss/1198892/?ref=app
https://www.sololearn.com/discuss/627894/?ref=app
https://www.sololearn.com/discuss/425065/?ref=app
+ 7
https://www.sololearn.com/discuss/1054246/?ref=app
+ 7
Nabil not ".src", it's "src"
space between string and controls attribute
+ 6
Use <audio> tag.
+ 5
It works.thanks buddy
+ 4
Can I insert a music from my Dropbox?
+ 4
Thanks buddy
+ 4
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<audio .src="https://dl.dropbox.com/s/8xrst3jec5h75zt/Alan_Walker_-_All_Falls_Down_%28feat._Noah_Cyrus_with_Digital_Farm_Animals%29%28128k%29.mp3?raw=1"controls></audio>
</body>
</html>
+ 3
Wire the programme and add the <audio. src = "..... > </audio>
+ 3
<audio src="sample.mp3" type="audio/mpeg">
</audio>
Or
<source src="sample.mp3" type="audio/mpeg">
</source>
+ 3
Yes by using the audio tag e.g <audio controls autoplay loop>
<source src="audiofile.mp3" type="audio/mpeg">
</audio>. The "audiofile.mp3" is the source of audio file you want to put in your webpage, controls display the control for the user, autoplay and loop not neccessary, autoplay starts playing the audio without the user's permission and loop continues playing the audio from the start even though it has ended.
+ 3
Wire the programme and add the <audio. src = "..... > </audio>
+ 3
Music is audio so use <audio> tag
+ 3
You want to add music to web using JS,
then definitely check this out : https://stackoverflow.com/questions/9419263/playing-audio-with-javascript
+ 2
https://code.sololearn.com/WBf5zovmh1he/?ref=app
+ 2
But why does it isn't working?
+ 2
+ 2
You should use html 5 element audio tag
<audio src="sample.mp3" type="audio/mpeg"></audio>