Quiz 2 solutions: EECS 101
  1. (1 point) What is the difference between a text field and a text area?

    A text field is created using the HTML statement:

    <INPUT TYPE=TEXT>

    and allows for the input of exactly one line of text.

    A textarea is created using the HTML statement:

    <TEXTAREA>
    ...
    </TEXTAREA>

    and allows for the input of multiple lines of text.


  2. (2 points) Give an HTML code fragment which generates the following table:

    HelloWorld
    
    <table border><tr><td>Hello</td><td>World</td></tr></table>
    
    

  3. (4 points) Draw the table produced by the following HTML segment

    <table border>
    <tr>
       <td colspan=2 align=right>Bugs</td>
       <td>Daffy</td>
    </tr>
    <tr>
       <td rowspan=2>Yosemite Sam</td>
       <td>Michigan Frog
       <td>Tweety
    </tr>
    <tr>
       <td>Sylvester
       <td>Tazmanian Devil
    </tr>
    </table>
    

    Solution:
    Bugs Daffy
    Yosemite Sam Michigan Frog Tweety
    Sylvester Tazmanian Devil


  4. (3 points) Give the HTML code which would generate the following form:

    Choose your car from the following list:

    Selction options:
    Power steering Automatic transmission

    <form>
    Choose your car from the following list:<br>
    <select>
    <option>Ford
    <option>Chevrolet
    <option>Toyota
    </select><br>
    Selction options:<br>
    <input type=checkbox>Power steering
    <input type=checkbox>Automatic transmission
    <br><br>
    <input type=button value="How much does it cost?">
    </form>