1. Home
  2. Computing & Technology
  3. JavaScript

Hangman Script

4. The Stylesheet

clr gif

Like the script with your answers in it the stylesheet also attaches to the top of the page.

To set up the stylesheet simply highlight and copy the below code and then save it as a file called hang.css. There is a button below the form to make highlighting the code easier.

You then link this code into the head of your page directly below the link you just inserted to attach the answer script using the following code:

<link rel="stylesheet" href="hang.css" type="text/css" />

The final step if you are using the version of the script that uses image is to obtain the eleven hangman images that the script uses.

To see how scripts created with this generator actually work take a look at this version of my Javascript Objects Hangman that doesn't use images.

Explore JavaScript
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2009 About.com, a part of The New York Times Company.

All rights reserved.