CIT 597 Quiz 3: Client-side JavaScript, CSS, and XML
Fall 2008, David Matuszek Name_________________________________________
  1. (10 points) Write the JavaScript command to pop up a dialog box with the words "You lose!" and an OK button.

    alert("You lose!")

  2. (10 points) JavaScript "global" variables are actually fields of some "global" object. In JavaScript code in HTML, what is the name of this object?

    window (or in some places, this)

  3. (20 points) List the four parts of a CSS "box" in order (from outside to inside).

    margin, border, padding, content

  4. (10 points) What is the purpose of XML?

    to provide a platform-independent representation of data; or
    to mark up data so it can be processed by computers


  5. (10 points) What does it mean to say that an XML page is valid? (Hint: two requirements.)

    It is well-formed (well-structured), and it satisfies a DTD (or some other schema)


  6. (10 points) What is the syntax of a PI?

    <?target   instructions?>

  7. (10 points) What is the purpose of namespaces?

    To allow a document to reference more than one DTD, or
    to specify which DTD defines a given tag


  8. (10 points) List the five XML entities.

    &   <   >   "   '

  9. (10 points) What is mixed content?

    When an element contains both text and other elements