How to add Mad Libs to your web page
- Click here to download the MadLibs.class file.
- Put the file in your web directory.
- Copy the following text into any web page:
<CENTER>
<APPLET CODEBASE="." CODE="MadLibs.class" HEIGHT="1000" WIDTH="500">
<PARAM NAME=MLTEXT VALUE="mymadlibsfile.txt">
<PARAM NAME="SCRAMBLED" VALUE="yes">
</APPLET>
</CENTER>
- You can change the numbers for "HEIGHT" and "WIDTH" to
change the way the applet appears on your page.
- Click here to download an example of how to write
your own madlibs file.
- Write your own Mad Libs, following the example above, and save it as a
text file in the same directory as MadLibs.class.
- Change the code that you wrote in step 3. Instead of "mymadlibsfile.txt"
change it to the name of the file you wrote.
- You can also change the line that says SCRAMBLED from "yes" to
"no" if you want the words to be read in the same order that they
are in your file.
Please credit me as the author of this program by providing a link
to this page. The address is: http://www.apollowebworks.com/russell/java/madlibs
More about Mad-Libs