Hi!
Hello, in this tutorial, I'm going to show you how to make an keyboard audio player. This will integrate Javascript (should have basic knowlege of) and HTML (same). We'll use the keyboard to play and pause audio.

Other Uses
In this tutorial, I'm going to use a <embed> element to mess around with. You could use this with others like making a button dissapear or other actions. I'll show you how to do this at the end.

Step 1 The Template
Lets start out with our template. Yes I do this in all my other tutorials but just do it anyway.

I added some elements in their. We have the <script> tags for our functions and JS. The <embed> is for the audio player. The <p> elements are for the instructions. Finally, the <form> elements are for our play/pause selection.

Step 2 Filling it In
Now, lets fill in some of our template. Don't fill in the script yet though!
---<embed>
Fill this with the source of your audio/video file. Use the parameters:

Afterward
Yay! It worked. Now, childeren, what can we use this for? Well, it doesn't have to be a <embed> element. It could call a function or hide an element or hundreds of other uses. The main idea isn't really to make a keyboard audio player. Honestly, the idea is how to use keyboard events. Put it to use guys.

Different Keys
If you want to use different keys, change key1 to another number. This number is an ASCII key code. A list of them can be found here.

Resources
If you didn't understand the HTML here, try going to W3CSchools. They have lots of HTML tutorials. link
If you didn't understand the JS, again, W3C is probably the place to go. link