I’m a student and a newbie to Github. I’m trying to create a website using Github. I’m a beginner to coding, but I know some basic HTML and markdown like the basic <h1>, <p> etc.

I followed an online tutorial to set up my basic page, which is working, but have a question:

I’d like to add a mp3 file so that there will be a background music that plays immediately when someone clicks on my website. Is that possible? (Also, I’m aware some people avoid adding auto-play music because it may be annoying, but the music I intend to add is a soft instrumental music and this is for a school assignment so I would really hope to be able to add it.)

The width and height attribute given above causes the player to be invisible. If you do not want it to be invisible, you can specify your own dimensions to suit your site decor.

For Opera and all IE versions, the following code works:

<bgsound src="yourmusicfile.mid" loop="infinite">

As you probably have noticed, IE 3.0 and above support both methods, so you cannot simply put both those tags into your web document in the hope of supporting all browsers. It will work on Netscape and early versions of IE, but the newer versions of IE will recognize both tags, leading to problems when IE tries to load the music file twice.

The workaround that I’ve seen on some sites, that seems to work for me, is to enclose the BGSOUND tag inside NOEMBED tags, thus preventing IE from interpreting the second tag.