Code for making multiple choice in Html Blogger
Q1. What is 2+3?
5
8
10
9
Q2. What is 8+3?
2
8
11
9
Q3. What is 28+3?
15
31
10
19
5
8
10
9
Q2. What is 8+3?
2
8
11
9
Q3. What is 28+3?
15
31
10
19
This code for making multiple choice in HTML Blogger
<a class="rcorner" href="#" style="background-color: #4caf50; border-radius: 20px; color: white; padding: 5px 10px; text-decoration: none;"> Q1. What is 2+3?</a><br/>
<input id="correct1" name="qusetion1" type="radio" /style="background-color: #4caf50; border-radius: 15px; color: white; padding: 10px 20px; text-decoration: none;" >5<br />
<input name="qusetion1" type="radio" />8<br />
<input name="qusetion1" type="radio" />10<br />
<input name="qusetion1" type="radio" />9<br />
<a class="rcorner" href="#" style="background-color: #4caf50; border-radius: 20px; color: white; padding: 5px 10px; text-decoration: none;"> Q2. What is 8+3?</a><br/>
<input name="qusetion2" type="radio" />2<br />
<input name="qusetion2" type="radio" />8<br />
<input id="correct2" name="qusetion2" type="radio" />11<br />
<input name="qusetion2" type="radio" />9<br />
<a class="rcorner" href="#" style="background-color: #4caf50; border-radius: 20px; color: white; padding: 5px 10px; text-decoration: none;">Q3. What is 28+3?</a><br/>
<br />
<input name="qusetion3" type="radio" />15<br />
<input id="correct3" name="qusetion3" type="radio" />31<br />
<input name="qusetion3" type="radio" />10<br />
<input name="qusetion3" type="radio" />19<br />
<input name="submit" onclick="result()" type="submit" value="submitQuiz" />
<script type="text/javascript">
function result() {
var score=0;
if (document.getElementById('correct1').checked)
{
score++;
}
if (document.getElementById('correct2').checked)
{
score++;
}
if (document.getElementById('correct3').checked)
{
score++;
}
document.write("Your score is:"+score);
}
</script>
Post a Comment for "Code for making multiple choice in Html Blogger"