<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<TITLE>Practice Exercises</TITLE>

<SCRIPT LANGUAGE="JavaScript">
<!-- 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

// 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 = 3;
  var nButtons = 15;
  var score = 0;

  for (i=1; i<=nButtons; i++)  // For the 1st to the 15th radio button repeat
  {                            // the following series of commands
    if ( (document.PE1.elements[i].value == Answer[i]) && // If button correct
         (document.PE1.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.PE1.ID.value + "\n";
  emailData+="PE 1 Button 1: "+document.PE1.Q1[0].checked + "\n";  //Item 1
  emailData+="PE 1 Button 2: "+document.PE1.Q1[1].checked + "\n";
  emailData+="PE 1 Button 3: "+document.PE1.Q1[2].checked + "\n";
  emailData+="PE 1 Button 4: "+document.PE1.Q1[3].checked + "\n";
  emailData+="PE 1 Button 5: "+document.PE1.Q1[4].checked + "\n";
  emailData+="PE 2 Button 6: "+document.PE1.Q2[0].checked + "\n";  //Item 2
  emailData+="PE 2 Button 7: "+document.PE1.Q2[1].checked + "\n";
  emailData+="PE 2 Button 8: "+document.PE1.Q2[2].checked + "\n";
  emailData+="PE 2 Button 9: "+document.PE1.Q2[3].checked + "\n";
  emailData+="PE 2 Button 10: "+document.PE1.Q2[4].checked + "\n";
  emailData+="PE 3 Button 11: "+document.PE1.Q3[0].checked + "\n";  //Item 3
  emailData+="PE 3 Button 12: "+document.PE1.Q3[1].checked + "\n";
  emailData+="PE 3 Button 13: "+document.PE1.Q3[2].checked + "\n";
  emailData+="PE 3 Button 14: "+document.PE1.Q3[3].checked + "\n";
  emailData+="PE 3 Button 15: "+document.PE1.Q3[4].checked + "\n";
  emailData+="SCORE: "+computescore() + "\n";
  form.maildata.value = header + emailData;
  alert("This is what is being submitted to the instructor.    " + form.action + '       '+
    form.maildata.value);
  return true;
}

// -->
</SCRIPT>
</HEAD>
<BODY>
<HR>
    <FORM NAME="PE1" onReset="return confirm('Clear entries? Are you sure?')">
      <STRONG>
        <H1><CENTER>Logical Element Practice Exercises</CENTER></H1>
        <PRE>NAME:  <INPUT TYPE="text" NAME="ID" SIZE=25></PRE>
        <H3>
          Enter the single best answer to each question below.
        </H3>
        <HR>
        <P>
        <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>
         <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>
         <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>
         <BR>
       <HR>
       <CENTER>
       <INPUT TYPE="RESET" VALUE="Clear Entries"><BR><BR>
       <INPUT TYPE="BUTTON" VALUE="Show Score" onClick="alert('Your score is '+computescore()+'%.')"><BR>
       </CENTER>
       </STRONG>
    </FORM>
    <FORM NAME="EMAIL"
          ACTION="mailto:cjohnson@acad1.sahs.uth.tmc.edu"
          METHOD="post"
          ENCTYPE="multipart/form-data"
          onSubmit="return emailResults(this)">
      <INPUT TYPE="HIDDEN" NAME="maildata" VALUE="">
      <CENTER>
      <INPUT TYPE="submit" VALUE="Submit to Instructor...">
      </CENTER>
    </FORM>
</BODY>
</HTML>