
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Add Background Music in HTML
The HTML <bgsound> tag is used to play music in the background. This tag is for Internet Explorer only.
Example
You can try to run the following code to add background music in HTML −
<!DOCTYPE html> <html> <head> <title>HTML bgsound Tag</title> </head> <body> <bgsound src = "/html/yourfile.mdi"/> <p>Plays sound file in the background.</p> </body> </html>
The HTML <bgsound> tag also supports the following attributes −
Attribute |
Value |
Description |
---|---|---|
loop |
number |
Lets you replay a background soundtrack a certain number of times. |
src |
URL |
Specifies the path of the sound file. |
Advertisements