<TITLE>Practice Exercises</TITLE>

<!-- Hide script from older browsers

// Below defines the answers. Only correct buttons have correct answers.
Answer = new Array("",
                  "","","","","5",   //Answers for 1 thru 5 buttons
                  "","","","4","",   //Answers for 6 thru 10 buttons
                  "","","","","5",   //Answers for 11 thru 15 buttons
                  "","","","","5",   //Answers for 16 thru 20 buttons
                  "","","3","","");  //Answers for 21 thru 25 buttons

// Below defines the computescore function.
function computescore ()  // Name the function to be defined
{                         // Start the function definition
  var nCorrect=0;         // Set the variables to their starting values
  var nItems = 5;
  var nButtons = 25;
  var score = 0;

  for (i=1; i<=nButtons; i++)  // For the 1st to the 25th radio button repeat
  {                            // the following series of commands
    if ( (document.PE2.elements[i].value == Answer[i]) && // If button correct
         (document.PE2.elements[i].checked == true) )     // & checked
      nCorrect+=1;                                        // Add 1 to nCorrect
  score = (Math.floor((nCorrect/nItems)*10000+0.5))/100;  //Compute % & Round
  return score;                                           //Return score when
                                                          //function executes
}                              // End the function definition

function emailResults(form) {
  var header = "";
  var emailData="";

  header += "\nTitle:  " + document.title + "\n";                 //Header Info
  header += "From: " + document.location + "\n\n";
  emailData+="NAME:  "+document.PE2.ID.value + "\n";
  emailData+="PE 1 Button 1: "+document.PE2.Q1[0].checked + "\n";  //Item 1
  emailData+="PE 1 Button 2: "+document.PE2.Q1[1].checked + "\n";
  emailData+="PE 1 Button 3: "+document.PE2.Q1[2].checked + "\n";
  emailData+="PE 1 Button 4: "+document.PE2.Q1[3].checked + "\n";
  emailData+="PE 1 Button 5: "+document.PE2.Q1[4].checked + "\n";
  emailData+="PE 2 Button 6: "+document.PE2.Q2[0].checked + "\n";  //Item 2
  emailData+="PE 2 Button 7: "+document.PE2.Q2[1].checked + "\n";
  emailData+="PE 2 Button 8: "+document.PE2.Q2[2].checked + "\n";
  emailData+="PE 2 Button 9: "+document.PE2.Q2[3].checked + "\n";
  emailData+="PE 2 Button 10: "+document.PE2.Q2[4].checked + "\n";
  emailData+="PE 3 Button 11: "+document.PE2.Q3[0].checked + "\n";  //Item 3
  emailData+="PE 3 Button 12: "+document.PE2.Q3[1].checked + "\n";
  emailData+="PE 3 Button 13: "+document.PE2.Q3[2].checked + "\n";
  emailData+="PE 3 Button 14: "+document.PE2.Q3[3].checked + "\n";
  emailData+="PE 3 Button 15: "+document.PE2.Q3[4].checked + "\n";
  emailData+="PE 4 Button 16: "+document.PE2.Q4[0].checked + "\n";  //Item 2
  emailData+="PE 4 Button 17: "+document.PE2.Q4[1].checked + "\n";
  emailData+="PE 4 Button 18: "+document.PE2.Q4[2].checked + "\n";
  emailData+="PE 4 Button 19: "+document.PE2.Q4[3].checked + "\n";
  emailData+="PE 4 Button 20: "+document.PE2.Q4[4].checked + "\n";
  emailData+="PE 5 Button 21: "+document.PE2.Q5[0].checked + "\n";  //Item 3
  emailData+="PE 5 Button 22: "+document.PE2.Q5[1].checked + "\n";
  emailData+="PE 5 Button 23: "+document.PE2.Q5[2].checked + "\n";
  emailData+="PE 5 Button 24: "+document.PE2.Q5[3].checked + "\n";
  emailData+="PE 5 Button 25: "+document.PE2.Q5[4].checked + "\n";
  emailData+="SCORE: "+computescore();
  form.maildata.value = header + emailData;
  alert("This is what is being submitted to the instructor.   " + form.action + '       '+
  return true;

// -->
    <FORM NAME="PE2" onReset="return confirm('Clear entries? Are you sure?')">
        <H1><CENTER>Logical Element Practice Exercises</CENTER></H1>
        <PRE>NAME:  <INPUT TYPE="text" NAME="ID" SIZE=25></PRE>
          Enter the single best answer to each question below.
        <B>Item 1:</B><BR>
         What HTML logical element typically produces underlined text?<BR><BR>
         <INPUT NAME="Q1" TYPE="RADIO" VALUE=1 CHECKED onClick="alert('Sorry, try again.');">No Response<BR>
         <INPUT NAME="Q1" TYPE="RADIO" VALUE=2 onClick="alert('STRONG typically does not produce underlining. Please try again.');">STRONG <BR>
         <INPUT NAME="Q1" TYPE="RADIO" VALUE=3 onClick="alert('Sorry, CITE is for citations.');">CITE<BR>
         <INPUT NAME="Q1" TYPE="RADIO" VALUE=4 onClick="alert('U is not correct. It is a physical element.');">U<BR>
         <INPUT NAME="Q1" TYPE="RADIO" VALUE=5 onClick="alert('None is correct, congratulations.');">None of the above<BR>
        <B>Item 2:</B><BR>
         What HTML logical element typically produces italic text?<BR><BR>
         <INPUT NAME="Q2" TYPE="RADIO" VALUE=1 CHECKED onClick="alert('Sorry, try again.');">No Response<BR>
         <INPUT NAME="Q2" TYPE="RADIO" VALUE=2 onClick="alert('There is no ITALIC element, Sorry, try again.');">ITALIC <BR>
         <INPUT NAME="Q2" TYPE="RADIO" VALUE=3 onClick="alert('Your response is incorrect. Please try again.');">I<BR>
         <INPUT NAME="Q2" TYPE="RADIO" VALUE=4 onClick="alert('EM is correct. Congratulations.');">EM<BR>
         <INPUT NAME="Q2" TYPE="RADIO" VALUE=5 onClick="alert('H1 produces the largest heading size. Try again.');">H1<BR>
        <B>Item 3:</B><BR>
         What HTML logical element typically produces superscript text?<BR><BR>
         <INPUT NAME="Q3" TYPE="RADIO" VALUE=1 CHECKED onClick="alert('Sorry, try again.');">No Response<BR>
         <INPUT NAME="Q3" TYPE="RADIO" VALUE=2 onClick="alert('SUP is a physical element. Please try again.');">SUP<BR>
         <INPUT NAME="Q3" TYPE="RADIO" VALUE=3 onClick="alert('SUB is a physical element. Please try again.');">SUB<BR>
         <INPUT NAME="Q3" TYPE="RADIO" VALUE=4 onClick="alert('S is a physical element. Try again.');">S<BR>
         <INPUT NAME="Q3" TYPE="RADIO" VALUE=5 onClick="alert('None of the above is correct.');">None of the above<BR>
        <B>Item 4:</B><BR>
         What HTML logical element typically marks quoted text?<BR><BR>
         <INPUT NAME="Q4" TYPE="RADIO" VALUE=1 CHECKED onClick="alert('Sorry, try again.');">No Response<BR>
         <INPUT NAME="Q4" TYPE="RADIO" VALUE=2 onClick="alert('Sample is incorrect. Try it again.');">SAMPLE <BR>
         <INPUT NAME="Q4" TYPE="RADIO" VALUE=3 onClick="alert('H2 produces the 2nd largest headings. Please try again.');">H2<BR>
         <INPUT NAME="Q4" TYPE="RADIO" VALUE=4 onClick="alert('CITE is for citations. Try again.');">CITE<BR>
         <INPUT NAME="Q4" TYPE="RADIO" VALUE=5 onClick="alert('BLOCKQUOTE is correct.');">BLOCKQUOTE<BR>
        <B>Item 5:</B><BR>
         What HTML logical element typically produces typewriter text?<BR><BR>
         <INPUT NAME="Q5" TYPE="RADIO" VALUE=1 CHECKED onClick="alert('Sorry, try again.');">No Response<BR>
         <INPUT NAME="Q5" TYPE="RADIO" VALUE=2 onClick="alert('EM is for emphasis (typically italics). Try again.');">EM <BR>
         <INPUT NAME="Q5" TYPE="RADIO" VALUE=3 onClick="alert('CODE is correct.');">CODE<BR>
         <INPUT NAME="Q5" TYPE="RADIO" VALUE=4 onClick="alert('TT is a physical style element.');">TT<BR>
         <INPUT NAME="Q5" TYPE="RADIO" VALUE=5 onClick="alert('VAR is for variables.');">VAR<BR>
       <INPUT TYPE="RESET" VALUE="Clear Entries"><BR><BR>
       <INPUT TYPE="BUTTON" VALUE="Show Score" onClick="alert('Your score is '+computescore()+'%.')"><BR>
          onSubmit="return emailResults(this)">
      <INPUT TYPE="HIDDEN" NAME="maildata" VALUE="">
      <INPUT TYPE="submit" VALUE="Submit to Instructor...">