CIT597 Quiz 1
Fall, 2003

Please keep all answers short and to the point. Read each question and answer it; don't add information that wasn't asked for.

  1. (10 points) What does each of the following acronyms stand for?
    1. HTML     HyperText Markup Language

    2. W3C     World Wide Web Consortium

    3. XML     eXtensible Markup Language

    4. DTD     Document Type Definition

    5. CSS     Cascading StyleSheet

  2. (10 points)Write the HTML required to produce the following table:

    Good Evil
    Sun Microsoft
    Java C#
    <table border="1" cellspacing="0" cellpadding="4">
  3. (10 points) There is an image file, smiley.gif, in the same directory as an HTML file. Write the HTML you would use to insert the image into the HTML file, and display the text "Smiley face" on those browsers that don't download images.

    <img src="smiley.gif" alt="Smiley face">

  4. (5 points) Briefly, what is the main purpose of XML?

    To mark up data so it can be processed by computers.

  5. (5 points) Complete this sentence: To be valid, an XML document must be well-structured and must also...

    declare a DTD and conform to it.

  6. (20 points) To be well-structured, XML documents must follow several rules. Give four and only four of these rules.

    (Any four of:)
    1. Must start with <?xml version="1.0?>
    2. There must be one and only one root element.
    3. Every element must have both a start tag and an end tag.
    4. Elements must be properly nested.
    5. The values of attributes must be enclosed in single or double quotes
    6. Character data cannot contain < or &
    7. Attributes may not be abbreviated.
    8. Names may not begin with XML (in any case)

  7. (5 points) There are two general problems with DTDs. What are they?

    1. They are a very weak specification language.

    2. They are not written in XML (hence require an additional parser).

  8. (5 points) Briefly, what is the main purpose of CSS?
    Any of:
         To separate content from presentation
         To define appearance in a single place for multiple pages
         To provide a means of presenting XML in a more readable fashion

  9. (15 points) Tell, in English, what each of the following CSS rules do:

    1. i { color: blue; }
      Make all i (italic) text blue.
    2. * { color: red; }
      Make all text red, except where overridden by more specific rules.
    3. h1, h2, h3 { text-align: right; }
      Make level 1, 2, and 3 headers right-justified.

  10. (15 points) Briefly describe each of the following CSS terms. Draw a picture if it helps you explain.

    Margins (invisible)
    The element itself
    1. border -- the possibly visible line around the element

    2. margins -- the space between the border and the surrounding text

    3. padding -- the space between the element and the border