Below is an HTML file with embedded CSS and JavaScript to create a basic arithmetic quiz for students. This quiz includes 10 questions that are generated dynamically, with a field for entering answers and a submit button. The CSS changes depending on whether the answer is correct or incorrect.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Arithmetic Quiz</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 20px;
background-color: #f4f4f9;
}
.question {
margin: 20px 0;
}
#result {
font-size: 20px;
margin-top: 20px;
}
.happy {
color: green;
background-color: #ccffcc;
}
.sad {
color: red;
background-color: #ffcccc;
}
input[type="number"], button {
padding: 8px;
font-size: 16px;
margin-top: 5px;
}
</style>
</head>
<body>
<h1>Arithmetic Quiz</h1>
<div class="question">
<p id="questionText"></p>
<input type="number" id="answer" placeholder="Enter your answer here">