Home
Tutorial
Quiz App
Build Quiz App using HTML, CSS and JavaScript
Online HTML Editor : Quiz App Result
Run Output
Output Rosolution:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Quiz</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@100;400;700&display=swap" rel="stylesheet"> <style> *{ margin: 0; padding: 0; box-sizing: border-box; } body{ background: #911ae2; font-family: 'Roboto', sans-serif; } .start_quiz{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); border: 2px solid #fff; padding: 10px 30px; color: #fff; border-radius: 10px; font-size: 24px; cursor: pointer; transition: all 0.3s; } .start_quiz:hover{ background: #fff; color: #911ae2; } .inactive{ display: none; } .disabled{ pointer-events: none; } .footer-left{ font-size: 18px; } .next-btn{ font-size: 18px; border: 2px solid #fff; border-radius: 5px; padding: 10px; cursor: pointer; transition: all 0.3s; } .next-btn:hover{ background: #fff; color: #911ae2; } .result-box{ position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); color: #fff; box-shadow: 0 0 10px #777; width: 100%; max-width: 450px; background: rgba(0,0,0,0.5); } .result-box h2{ font-size: 36px; background: #fff; color: #911ae2; text-align: center; padding: 20px 0; } .result-box .result{ padding: 40px; } .result-box h3{ font-size: 30px; margin-bottom: 10px; } .result-footer{ display: flex; justify-content: space-around; padding-bottom: 30px; } .result-footer .again-quiz,.result-footer .exit{ border: 2px solid #fff; border-radius: 5px; padding: 10px 20px; font-size: 24px; cursor: pointer; transition: all 0.3s; } .result-footer .again-quiz{ background: #911ae2; color: #fff; border-color: #911ae2; } .result-footer .again-quiz:hover{ background: #fff; color: #911ae2; border-color: #fff; } .result-footer .exit{ background: #fff; color: #911ae2; border-color: #fff; } .result-footer .exit:hover{ background: #911ae2; color: #fff; border-color: #911ae2; } </style> </head> <body> <div class="result-box"> <h2>Result</h2> <div class="result"> <h3 class="total-que">Total Questions : <span>5</span></h3> <h3 class="right-ans">Right Answers : <span>3</span></h3> <h3 class="wrong-ans">Wrong Answers : <span>2</span></h3> <h3 class="percentage">Percentage : <span>60.00%</span></h3> </div> <div class="result-footer"> <div class="again-quiz">Again Quiz</div> <div class="exit">Exit</div> </div> </div> </body> </html>