HTML Background Music Code
You can add HTML background music code to your website by using the <audio>
element, but omitting the controls
attribute. Thecontrols
attribute specifies that there should be controls (such as a "Play" button, "Pause" button etc) so by removing this attribute, no controls will be displayed.
Try It
You can try this using the example below. Update control
with autoplay
, then clickRefresh Result.
This will hide the controls and automatically play the music in the background.
Post a Comment