A beautiful, interactive web-based quiz application designed to test your knowledge across different difficulty levels. Built with vanilla HTML, CSS, and JavaScript, featuring a modern UI with smooth animations and responsive design.
- 🎯 Three Difficulty Levels: Easy (5 points), Medium (10 points), and Hard (15 points)
- 📊 Real-time Scoring: Watch your score update as you play
- 🎨 Modern UI: Beautiful gradient backgrounds with glassmorphism effects
- 📱 Responsive Design: Fully responsive and works on all devices
- ⏱️ Auto-advance: Questions automatically move to the next after selection
- 🔄 Randomized Answers: Answer choices are shuffled for each question
- 📈 Detailed Results: View your right answers, wrong answers, and total score
- 💾 Local Storage: Progress saved using browser localStorage
No special requirements! Just a modern web browser and a web server (or run locally).
- Clone or download this repository
- Open
index.htmlin a web browser, or - Serve the files using a local web server:
# Using Python 3
python -m http.server 8000
# Using Node.js (with http-server)
npx http-server
# Using PHP
php -S localhost:8000- Open
http://localhost:8000in your browser
Quiz/
│
├── index.html # Landing page with start button
├── level.html # Difficulty selection page
├── game.html # Main quiz game page
├── score.html # Results display page
│
├── scripts/
│ ├── main.js # Main game logic and event handling
│ ├── questions.js # Question database and randomization
│ └── score.js # Score display logic
│
└── images/
├── logo.png # Application logo
└── edk.html # (Test/debug file)
- Start: Click "Start Game" on the landing page
- Choose Level: Select Easy, Medium, or Hard difficulty
- Answer Questions: Click on your answer choice
- Correct answers turn green and add points
- Wrong answers turn red
- After 5 seconds, automatically moves to the next question
- Or click "Next" to skip waiting
- View Results: See your final score and statistics
- Play Again: Click "Play Again" to restart
- Easy Questions: 5 points each (Level 1)
- Medium Questions: 10 points each (Level 2)
- Hard Questions: 15 points each (Level 3)
Each difficulty level contains 20 questions covering various web development topics.
- HTML5: Semantic markup
- CSS3:
- Flexbox & Grid layouts
- CSS animations and transitions
- Glassmorphism effects
- Responsive media queries
- Vanilla JavaScript (ES6+):
- ES6 modules
- Classes and object-oriented programming
- DOM manipulation
- Event handling
- LocalStorage API
- Fisher-Yates shuffle algorithm
- Google Fonts: Roboto & Intel One Mono
The quiz covers a wide range of web development topics:
- HTML basics (tags, attributes, structure)
- CSS fundamentals (properties, selectors)
- JavaScript basics (variables, functions, comments)
- JavaScript concepts (DOM, events, arrays, objects)
- CSS layouts (Grid, Flexbox)
- Advanced HTML (forms, tables)
- Async operations and APIs
- Advanced JavaScript (closures, prototypes, event loop)
- Modern web technologies (PWA, WebSockets, WebAssembly)
- Build tools and frameworks (Webpack, Redux, TypeScript)
- Performance optimization
- Security and authentication (JWT, CORS)
- Animated Backgrounds: Floating gradient circles
- Glassmorphism UI: Frosted glass effects with backdrop filters
- Smooth Transitions: Hover effects and state changes
- Color-Coded Levels:
- 🟢 Green for Easy
- 🟠 Orange for Medium
- 🔴 Red for Hard
- Typography: Clean, modern fonts with proper hierarchy
- Accessibility: High contrast colors and readable fonts
Edit scripts/questions.js and add questions following this format:
shuffleOptionsAndUpdateIndex({
id: uid(),
question: 'Your question here?',
level: 1, // 1 = Easy, 2 = Medium, 3 = Hard
points: 5, // Points for correct answer
correctAnswer: 'Correct answer',
options: [
'Option 1',
'Option 2',
'Option 3',
'Option 4'
],
correctOptionIndex: 0 // Initially 0, auto-updated by shuffle
}),All styles are inline in the HTML files. Main color scheme:
- Primary:
#024704(Dark green) - Accent:
#4CAF50(Green) - Background: Black with green gradient
- ✅ Chrome/Edge (latest)
- ✅ Firefox (latest)
- ✅ Safari (latest)
- ✅ Opera (latest)
Requires ES6+ support for modules.
Contributions are welcome! Feel free to:
- Add more questions
- Improve UI/UX
- Fix bugs
- Add new features
This project is open source and available under the MIT License.
- Questions compiled by the development team
- Design inspired by modern web trends
- Fonts provided by Google Fonts
Made with ❤️ for learning and fun!
Happy Quizzing! 🎉