CIT597 Quiz 1
Fall, 2007
Name_________________________________________
  1. (10 points) Write the HTML needed to create the following table.
    Macintosh Very good
    XP Very good
    Vista Needs work
    <table border="1">
      <tr>
        <th>Macintosh</th>
        <td>Very good </td>
      </tr>
      <tr>
        <th>XP</th>
        <td>Very good </td>
      </tr>
       <tr>
        <th>Vista</th>
        <td>Needs work </td>
      </tr>
     </table>
  2. (20 points) Correct all the errors in the following XML. Do not make any changes except to correct errors.

    <?xml version=1.0>
    <time>
      <hour AmPm=am>7</hour>
      <min>42<min>    
    </time>
    <time>
      <hour AmPm=pm>3</hour>
      <min>15<min>    
    </time>
    <time>
      <hour AmPm=pm>5</hour><min>30<min>
      <sec>29</sec>
    </time>








    <?xml version="1.0"?>
    <times> (or some similar name)
    <time>
      <hour AmPm="am">7</hour>
      <min>42</min>    
    </time>
    <time>
      <hour AmPm="pm">3</hour>
      <min>15</min>    
    </time>
    <time>
      <hour AmPm="pm">5</hour><min>30</min>
      <sec>29</sec>
    </time>
    </times>

  3. (20 points) Write a DTD for the above (corrected) XML.


    <!DOCTYPE times [
        <!ELEMENT times (time+)
        <!ELEMENT time (hour, min, sec?)
        <!ELEMENT hour (#PCDATA)>
        <!ELEMENT min (#PCDATA)>
        <!ELEMENT sec (#PCDATA)>
        <!ATTLIST hour AmPm (am|pm) #REQUIRED>

    ]>




  4. (25 points) List 5 of the rules that an XML document must satisfy in order to be well-structured.

  5. (5 points) What is the purpose of XML?


    To transfer data from one program to another, or one computer to another.


  6. (5 points) How do XHTML tags differ from HTML tags?


    XHTML tags must be lowercase


  7. (5 points) How does "strict" XHTML differ from "transitional" XHTML?


    Strict XHTML only allows content tags, not display tags


  8. (5 points) What two aspects of a document does HTML mix together?


    Structure (content) information and display information


  9. (5 points) What is the purpose of namespaces?

    To specify which DTD defines a given tag or attribute