JavaScript must be enabled to use some of the features on this page.

LearnHTML - Test
<?php include('../lib/inc/cache.inc.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="shortcut icon" type="image/x-icon" href="../lib/images/favicon.ico"/>
<?php include('../lib/inc/meta.inc.php'); ?>
<title>Quiz 3: Adv. Block &amp;amp; Inline Elements :: LearnHTML</title>
<script type="text/javascript" src="../lib/js/showHide.js"></script>	
<link href='http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold' rel='stylesheet' type='text/css' />
<link href="../lib/css/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {

	var a = new Array("1","0","1","0"); // The answers to your questions go here. Remember - these are zero-based so a question with the second choice correct answer would have the number 1 inserted into this array.
	
	
	var c = new Array();
	
	$('input[type="radio"]').click(function() {
	//#############################################################################
			$(this).closest('div').children('p.answer').remove();		   						  
			var name = this.name;	
			var re = /\s*_\s*/;
			var question = name.split(re);
			var answer = question[1];
			if(this.value==a[answer]) {
				$(this).closest('div').append('<p class="correct answer">Correct!</p>');
				c[answer] = "1";
				if(c.length == a.length) {
					$.each(c, function(key, value) {
								if (value != "1") {
									return false;
								} else {
									if((key+1) == a.length) {
										$('form').append('<div class="question"><p class="correct answer allCorrect">You got them all correct!</p></div>');
									}
								}
					});
				}
			} else {
				$(this).closest('div').append('<p class="incorrect answer">I\'m sorry but this is not correct. Please try again.</p>');
			}
	});
						   
});
</script>

</head>

<body>

<div id="container"><!--contains the whole page-->
	
    <div id="header">
    <?php include('../lib/inc/header.inc.php'); ?>
    </div><!--header-->
    
  <div id="nav">
  <?php include('../lib/inc/nav.inc.php'); ?>
    </div><!--nav-->
    
  <div id="content">
  		
        <div id="left">
        	<h1>Quiz 3: Adv. Block and Inline Elements</h1>
            
<form action="" method="get">
  <div class="question">
  <p>1) The &lt;dl&gt; tag stands for what?</p>
    <label>
      <input type="radio" name="q_0" value="0" id="question0_0" />
      definition letter</label>
    <br />
    <label>
      <input type="radio" name="q_0" value="1" id="question0_1" />
      data list</label>
    <br />
    <label>
      <input type="radio" name="q_0" value="2" id="question0_2" />
      definition list</label>
    <br />
    <label>
      <input type="radio" name="q_0" value="3" id="question0_3" />
     	down low</label>
    <br />
  </div>
    
    <div class="question">
  <p>2) The &lt;abbr&gt; tag is used for what purpose?</p>
    <label>
      <input type="radio" name="q_1" value="0" id="question1_0" />
      To label abbreviations and tell the user what it is </label>
    <br />
    <label>
      <input type="radio" name="q_1" value="1" id="question1_1" />
      It has no purpose</label>
    <br />
    <label>
      <input type="radio" name="q_1" value="2" id="question1_2" />
      To over rule acronyms</label>
    <br />
    <label>
      <input type="radio" name="q_1" value="3" id="question1_3" />
      To make abbreviations pretty</label>
    <br />
  </div>
    
    <div class="question">
  <p>3) What does the &lt;q&gt; do?</p>
    <label>
      <input type="radio" name="q_2" value="0" id="question2_0" />
      Makes quotes pretty</label>
    <br />
    <label>
      <input type="radio" name="q_2" value="1" id="question2_1" />
      Puts quotations around the quote</label>
    <br />
    <label>
      <input type="radio" name="q_2" value="2" id="question2_2" />
      It doesn't do anything</label>
    <br />
    <label>
      <input type="radio" name="q_2" value="3" id="question2_3" />
      It puts the quote's writer's name next to the quote</label>
    <br />
  </div>
  
  <div class="question">
  <p>4) What does the &lt;sub&gt; tag do?</p>
    <label>
      <input type="radio" name="q_3" value="0" id="question3_0" />
      It puts characters below the font line</label>
    <br />
    <label>
      <input type="radio" name="q_3" value="1" id="question3_1" />
      It puts characters above the font line</label>
    <br />
    <label>
      <input type="radio" name="q_3" value="2" id="question3_2" />
      It won't do anything</label>
    <br />
    <label>
      <input type="radio" name="q_3" value="3" id="question3_3" />
      It puts quotes around characters</label>
    <br />
  </div>
</form>
    
           
</div><!--left-->
        
        <div id="right">
    <img src="../lib/images/HTML_Construction.png" width="143" height="224" alt="HTML Construction Worker" /></div><!--right-->
        
        <div id="buttondiv">
        <a href="../lessons/lesson4.php"><img src="../lib/images/nextLessonBtn.png" width="220" height="70" alt="Next Lesson" /></a>
        </div><!--buttondiv-->
  
  </div><!--content-->
    
    
</div><!--container-->

<div id="foot">
    <?php include('../lib/inc/footer.inc.php'); ?>
</div><!--foot-->
    
</body>
</html>

LearnHTML - Test

By: Alan Fishel

After each lesson in LearnHTML there is a quiz to test what the person has learned and help them retain the information. There is also a final quiz that incorporates all the lessons together.

Critiques

There are currently no comments but you could be the first to leave one!

You must be logged in to leave a comment.

Site Details

Developer: Alan Fishel
URL: http://afishel.com/LearnHTML/
Advertisement

Other Info

Submitted:
Views: 1927
Comments: 0

Share

Other Works

LearnHTML - Home LearnHTML - Tutorial Page LearnHTML - Try it! LearnHTML - Test Posters Galore Posters Galore - Browse Posters Galore - Cart