From the course: Vanilla JavaScript: Mobile Game Programming

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Add the HTML elements for sound

Add the HTML elements for sound - JavaScript Tutorial

From the course: Vanilla JavaScript: Mobile Game Programming

Start my 1-month free trial

Add the HTML elements for sound

- [Instructor] Right now, our game is the quietest game ever invented. Let's see if we can add some noise to the game with sound effects and a background music track. Okay, in the html page, let's add some check boxes to our controls div. So, put your cursor right after the select elements line break, okay? And let's add a field set. And a field set elements just going to give me a nice visual que. Let's set a legend and the legend will just say, sound. And then underneath that we'll add an input. Let's set the type equal to check box and let's give it an ID equal to, I'm going to use snd for sound. And then directly beneath that we'll add a label and we'll add the label for the sound check box we just created. And that will be, I'll use the word effects for sound effects. And then outside the label, lets add a break and add a second input element. Type is also check box. Let's give this one a ID and we'll set that equal to music. And the label for that one will be for music. And the…

Contents