(Solved):When making an HTML game in Chrome, is there a way to have a sound automatically play without…

 

Question

When making an HTML game in Chrome, is there a way to have a sound automatically play without having controls? For instance, if we want a sound to play automatically when a character gets hit in a game.

 

EXPERT ANSWER

Hypertext Markup Language (HTML) describes the tags for formatting web content. As such, it cannot directly produce a sound without having controls. However, the web scripting language JavaScript, commonly embedded in HTML

Scroll to top