Current location - Music Encyclopedia - QQ Music - How to add background music to web design?
How to add background music to web design?

The materials that need to be prepared include: computer, browser, and html editor.

1. First, open the html editor and create a new html file, for example: index.html.

2. In the lt;bodygt; tag in index.html, enter the html code:

lt;audio autoplay="autoplay" loop=""gt;lt;source src="11704.mp3"gt;lt;/audiogt;.

3. The browser runs the index.html page, and the background music automatically plays as soon as you enter the page.