Project 2: Mad Libs (due Tuesday, March 3, 11:59 PM)

Summary

For this project, you will create a Mad Libs page. The user will select words from a list or type in their own and the page will generate a story using those words.

Here is a sample interface (NOTE: this interface does not fulfill the project requirements; see below).
blank form

After the user enters some information and clicks Generate!, the web page generates a story, for example:
filled-in form

Required files

You will create two files in total: story.html and story.js.

Interface

At minimum, your interface must have the following number of interface elements:

Each interface element should be titled with the type of word that the element should be filled in with like "Noun", "Verb", "Direct Object", "Happy Verb", "Color", "Dog Species", "Forbes 500 Company", "Superhero", etc...

The generated story must be at least 5 sentences long (and not sentences like "See Spot run. Run Spot run."). The generated story must include all the words chosen by the user. The chosen words must be surrounded by <strong> tags in the generated story.

NOTE: You may not use the same story (or some close derivative) as in the example above.

Useful Notes

It's possible to concatenate a whole series of strings over multiple lines provided that no individual string spans more than one line. For example:

var text = "It was a dark and stormy night.  A " + adjective
           + " " + noun + " was roaming the streets.  It " +
           verb + " the school.";
       

Grading Criteria

In addition to all the requirements stated above:

story.html must:

story.js must:

Turn-in instructions

When submitting, make sure you have the right section. Some TAs have two sections, so make sure you know which of the two sections is the right one. Turn in both files here.

Back to Home page