Overview
The quiz system features:- Multiple choice questions
- Real-time answer validation
- Score tracking
- Visual feedback (correct/incorrect indicators)
- Results display with percentage
- Restart functionality
- Responsive design
Basic Structure
The quiz consists of three main parts:- HTML container - Where the quiz renders
- CSS styling - Inline styles for quiz appearance
- JavaScript - Quiz logic and interactivity
Implementation
Example Questions from Source
Here are some real questions from the template:Question 1: Favorite Activity
Question 1: Favorite Activity
Question 2: Special Interests
Question 2: Special Interests
Question 3: Celebrity Crush
Question 3: Celebrity Crush
Quiz JavaScript Logic
The template uses a custom quiz library. Here’s the initialization pattern:Configuration Options
quizQuestions
Required: Array of question objectsContains all your quiz questions and answers in the data structure shown above.
elementId
Required: StringThe ID of the HTML element where the quiz should render. In the template:
'quiz_container'showAnswersBtn
Optional: Boolean (default:
true)Shows a “Show Answers” button at the end that reveals all correct answers.showResetBtn
Optional: Boolean (default:
true)Shows a “Try Again” button that resets the quiz so users can retake it.Question Object Structure
Each question follows this format:The
"right": true property indicates the correct answer. Only one option per question should have this set to true.Visual Feedback
The quiz provides instant visual feedback:- Hover effect: Options highlight in green (#25a186) when you hover
- Correct answer: Green checkmark (✓) appears and animates
- Wrong answer: Red X appears on your selection, correct answer shows in green
- Navigation: “Next” button becomes clickable after selecting an answer
Results Screen
After completing all questions, users see:- Score: Number of correct answers out of total
- Percentage: Score as a percentage
- Show Answers button: Review correct answers
- Try Again button: Restart the quiz
Customization Ideas
Question Categories
Organize questions by themes:
- “How They Met”
- “Favorite Things”
- “Travel Adventures”
- “Future Plans”
Difficulty Levels
Mix question types:
- Easy: Basic facts everyone knows
- Medium: Details close friends know
- Hard: Inside jokes and secrets
Personalized Results
Customize result messages:
- 90-100%: “You’re practically family!”
- 70-89%: “Great job! You know us well!”
- 50-69%: “Not bad! Learn more on our story page.”
- 0-49%: “Looks like we have some catching up to do!”
Social Sharing
Add share buttons to results:
- Share score on social media
- Challenge friends to beat your score
- Tag the couple in results
Mobile Responsiveness
The quiz includes mobile-friendly styling:Placement Options
Couple Story Page (Template Default)
Couple Story Page (Template Default)
Place the quiz at the top of your couple story page:This engages visitors before they read your full story.
Dedicated Quiz Page
Dedicated Quiz Page
Create a separate page just for the quiz:
After the Story
After the Story
Place it at the end of your couple story:
Best Practices
Answer Length: Keep answer options concise. Long text in multiple choice options becomes hard to scan and compare. Aim for 5-10 words per option.
Alternative Quiz Solutions
If you want different features, consider these alternatives:Typeform
Beautiful, conversational quiz interfacePros:
- Professional design
- Logic jumps
- Analytics
- Easy to create
- Requires external service
- Free tier limited
Google Forms
Self-grading quiz mode availablePros:
- Completely free
- Auto-grading
- Response collection
- Easy setup
- Less visual appeal
- Leaves your site
Quiz Ideas
Here are question categories to inspire your own quiz:- How They Met: First meeting, first date, where they lived
- Favorites: Food, movies, music, vacation spots
- Firsts: First concert, first trip, first “I love you”
- Quirks: Pet peeves, hidden talents, funny habits
- Relationship Milestones: How long together, engagement details
- Personal Facts: Childhood stories, career paths, hobbies
- Future Plans: Honeymoon destination, dream home, family goals
- Inside Jokes: Stories only close friends would know
