We always like to have a good image as a background for our website. But have you thought anytime of having a video as your page background? Earlier, it may not be possible. But now, we can have a YouTube video as our website page background. It’s really interesting, right? Ok, let us proceed on with how we can do this.
Have your video as the page background just with a simple code. To help you get started, we provide below the code that you could place in your web template. Copy the code below and paste it below the web template’s openingtag.
But make sure that you replace the ID in the code with the YouTube ID that you wish to have as your website page background. YouTube’s IFRAME tags are used internally, so that the embedded video occupies the entire page. The YouTube Video will be many layers below the main content page since the z-index has been set to negative.
Not able to mute the video sound without using JavaScript and that the video background does not work for mobile devices are the downsides for this feature.
The websites from Geocities era would play background music when you open them by using raw audio files like MP3, WAV or the MIDI format. But now, for your background audio, you can use any of your desired YouTube tracks. You could embed your embed YouTube video anywhere on your webpage with just a single line of code shown below. Not only that, you could also make it invisible by setting the height and width of the video player.
Now that you know, how to have YouTube video as your website page background and also to add music, start applying it to your website and have fun.