HTML - web page | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

HTML - web page

HOW DO I ADD AN AUDIO IN THE BACKGROUND OF MY HTML WEB PAGE??

30th May 2020, 5:31 AM
vxco
vxco - avatar
5 Answers
30th May 2020, 6:05 AM
ÃKR
ÃKR - avatar
+ 2
To add background music on a web page, use <embed>… </embed> element. Also, use the autoplay attribute. This will run music in the background whenever the page loads.
30th May 2020, 5:33 AM
Shubham Pandiya
Shubham Pandiya  - avatar
+ 2
https://www.sololearn.com/learn/HTML/2193/ Read this.Its help to solve your question 😊
5th Jun 2020, 11:12 AM
Keerthika C
Keerthika C - avatar
+ 2
You can use the <audio controls> <source src="audio-url-goes-here.mp3" type="audio/mpeg"> <source src="audio-url-goes-here.ogg" type="audio/ogg"> </audio> the browser will attempt to play the second format if it doesnt support the first hope this helps!
5th Jun 2020, 6:14 PM
Mo'
Mo' - avatar
30th May 2020, 5:57 AM
Shubham Pandiya
Shubham Pandiya  - avatar