Pronunciation Quiz Exercise Tool
Pronunciation Quiz Exercise Tool
doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<script src="/_sdk/element_sdk.js"></script>
<style>
body {
box-sizing: border-box;
margin: 0;
padding: 0;
color: #2d3748;
min-height: 100%;
*{
box-sizing: border-box;
.app-wrapper {
width: 100%;
max-width: 900px;
margin: 0 auto;
header {
text-align: center;
margin-bottom: 30px;
background: white;
padding: 30px;
border-radius: 16px;
h1 {
font-size: 36px;
margin: 0 0 10px 0;
color: #2d6a2d;
font-weight: 700;
.subtitle {
font-size: 16px;
color: #718096;
margin: 0;
.section-selector {
display: flex;
flex-direction: column;
gap: 20px;
margin-bottom: 30px;
max-width: 700px;
margin-left: auto;
margin-right: auto;
.section-btn {
padding: 30px 25px;
background: white;
border-radius: 12px;
cursor: pointer;
text-align: left;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
gap: 20px;
.section-btn:hover {
transform: translateY(-5px);
border-color: #28a745;
.[Link] {
color: white;
border-color: #2d6a2d;
.section-icon {
font-size: 56px;
line-height: 1;
flex-shrink: 0;
}
.section-text-content {
flex: 1;
display: flex;
flex-direction: column;
gap: 5px;
.section-title {
font-size: 20px;
font-weight: 700;
line-height: 1.2;
margin: 0;
.section-desc {
font-size: 14px;
opacity: 0.8;
line-height: 1.4;
margin: 0;
.quiz-container {
background: white;
padding: 30px;
border-radius: 16px;
margin-bottom: 20px;
display: none;
}
.[Link] {
display: block;
.progress-bar {
width: 100%;
height: 8px;
background: #e2e8f0;
border-radius: 10px;
margin-bottom: 25px;
overflow: hidden;
.progress-fill {
height: 100%;
border-radius: 10px;
.question-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 20px;
padding-bottom: 15px;
.question-number {
font-size: 14px;
font-weight: 700;
color: #2d6a2d;
text-transform: uppercase;
letter-spacing: 1px;
.question-score {
font-size: 14px;
font-weight: 600;
color: #718096;
.question-text {
font-size: 22px;
font-weight: 600;
color: #2d3748;
margin-bottom: 25px;
line-height: 1.5;
.word-display {
text-align: center;
padding: 30px;
border-radius: 12px;
margin-bottom: 25px;
.word-text {
font-size: 48px;
font-weight: 700;
color: #2d6a2d;
margin-bottom: 10px;
.word-ipa {
font-size: 24px;
color: #718096;
.audio-display {
text-align: center;
padding: 40px;
border-radius: 12px;
margin-bottom: 25px;
.play-audio-btn {
color: white;
border: none;
border-radius: 50px;
cursor: pointer;
font-size: 18px;
font-weight: 700;
display: inline-flex;
align-items: center;
gap: 10px;
.play-audio-btn:hover {
transform: scale(1.05);
.play-audio-btn:active {
transform: scale(0.98);
.options-grid {
display: grid;
grid-template-columns: 1fr;
gap: 15px;
margin-bottom: 25px;
.option-btn {
padding: 20px;
background: #f7fafc;
border-radius: 12px;
cursor: pointer;
text-align: left;
display: flex;
align-items: center;
gap: 15px;
font-size: 16px;
font-weight: 500;
.option-btn:hover:not(.disabled) {
background: #edf2f7;
border-color: #cbd5e0;
transform: translateX(5px);
.[Link] {
cursor: not-allowed;
opacity: 0.6;
.[Link]-correct {
background: #c6f6d5;
border-color: #48bb78;
color: #22543d;
.[Link]-wrong {
background: #fed7d7;
border-color: #f56565;
color: #742a2a;
.[Link]-correct {
background: #c6f6d5;
border-color: #48bb78;
}
.option-letter {
width: 35px;
height: 35px;
background: #2d6a2d;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-weight: 700;
flex-shrink: 0;
.[Link]-correct .option-letter {
background: #48bb78;
.[Link]-wrong .option-letter {
background: #f56565;
.option-audio {
background: #2d6a2d;
color: white;
border: none;
border-radius: 20px;
cursor: pointer;
font-size: 14px;
font-weight: 600;
transition: all 0.2s ease;
flex-shrink: 0;
.option-audio:hover {
background: #1e4620;
transform: scale(1.05);
.feedback {
padding: 20px;
border-radius: 12px;
margin-bottom: 25px;
display: none;
.[Link] {
display: block;
.[Link] {
background: #c6f6d5;
color: #22543d;
.[Link] {
background: #fed7d7;
color: #742a2a;
}
.feedback-title {
font-size: 18px;
font-weight: 700;
margin-bottom: 10px;
display: flex;
align-items: center;
gap: 10px;
.feedback-text {
font-size: 15px;
line-height: 1.6;
.next-btn {
width: 100%;
padding: 15px;
color: white;
border: none;
border-radius: 12px;
cursor: pointer;
font-size: 16px;
font-weight: 700;
display: none;
}
.[Link] {
display: block;
.next-btn:hover {
transform: translateY(-2px);
.next-btn:active {
transform: translateY(0);
.results-container {
background: white;
padding: 40px;
border-radius: 16px;
text-align: center;
display: none;
.[Link] {
display: block;
.results-icon {
font-size: 80px;
margin-bottom: 20px;
}
.results-title {
font-size: 32px;
font-weight: 700;
color: #2d3748;
margin-bottom: 15px;
.results-score {
font-size: 48px;
font-weight: 700;
color: #2d6a2d;
margin-bottom: 10px;
.results-message {
font-size: 18px;
color: #718096;
margin-bottom: 30px;
.restart-btn {
color: white;
border: none;
border-radius: 50px;
cursor: pointer;
font-size: 16px;
font-weight: 700;
.restart-btn:hover {
transform: scale(1.05);
footer {
text-align: center;
padding: 20px;
color: white;
font-size: 14px;
margin-top: 30px;
@keyframes slideIn {
from {
opacity: 0;
transform: translateY(-10px);
to {
opacity: 1;
transform: translateY(0);
h1 {
font-size: 28px;
}
.word-text {
font-size: 36px;
</style>
</head>
<body>
<main class="app-wrapper">
<header>
</header>
<div class="section-icon">
��
</div>
<div class="section-title">
Section 1
</div>
<div class="section-desc">
<div class="section-icon">
✍️
</div>
<div class="section-title">
Section 2
</div>
<div class="section-desc">
Audio to Word
<div class="section-icon">
</div>
<div class="section-title">
Section 3
</div>
<div class="section-desc">
Stress Patterns
</div></button>
</div>
<div class="progress-bar">
</div>
<div class="question-header">
Question 1 of 10
</div>
Score: 0/0
</div>
</div>
<div id="question-content"></div>
</div>
</div>
<div class="results-title">
Quiz Complete!
</div>
0/10
</div>
Great job!
</div>
<footer>
</footer>
</main>
<script>
const defaultConfig = {
};
const quizData = {
section1: [
word: "hypothesis",
ipa: "/haɪˈp��ːθəsɪs/",
correct: 2,
options: [
],
},
word: "entrepreneur",
ipa: "/ˌɑːntrəprəˈnɜːr/",
correct: 0,
options: [
],
explanation: "Correct answer is Option A: /ˌɑːntrəprəˈnɜːr/ with final syllable stress. Other
options have subtle vowel changes or slight stress placement shifts."
},
word: "phenomenon",
ipa: "/fəˈnɑːmɪnɑːn/",
correct: 3,
options: [
],
},
word: "algorithm",
ipa: "/ˈælɡərɪðəm/",
correct: 1,
options: [
],
explanation: "Correct answer is Option B: /ˈælɡərɪðəm/ with stress on first syllable (AL).
Notice the 'th' sound and schwa in second syllable."
},
word: "archaeology",
ipa: "/ˌɑːrkiˈɑːlədʒi/",
correct: 2,
options: [
],
explanation: "Correct answer is Option C: /ˌɑːrkiˈɑːlədʒi/ with stress on 'OL'. The 'ch'
makes a 'k' sound. Distractors have vowel or consonant variations."
},
{
word: "paradigm",
ipa: "/ˈpærədaɪm/",
correct: 0,
options: [
],
explanation: "Correct answer is Option A: /ˈpærədaɪm/ with first syllable stress. The 'g' is
silent. Distractors include pronouncing the 'g' or changing vowels slightly."
},
word: "hierarchy",
ipa: "/ˈhaɪərɑːrki/",
correct: 3,
options: [
],
},
word: "epitome",
ipa: "/ɪˈpɪtəmi/",
correct: 1,
options: [
],
explanation: "Correct answer is Option B: /ɪˈpɪtəmi/ with stress on 'PIT'. The final 'e' is
pronounced as 'ee'. Don't treat it like 'epitome' (silent e)."
},
word: "albeit",
ipa: "/ɔːlˈbi����t/",
correct: 2,
options: [
],
explanation: "Correct answer is Option C: /ɔːlˈbiːɪt/ with stress on 'BE'. Notice the 'aw'
sound at start and long 'ee' in middle. Distractors change vowel length or stress."
},
word: "chaos",
ipa: "/ˈkeɪɑːs/",
correct: 0,
options: [
],
explanation: "Correct answer is Option A: /ˈkeɪɑːs/ starting with 'K' sound (not 'ch').
Common error is pronouncing 'ch' like in 'chair'. Also watch the vowel sounds."
}
],
section2: [
word: "laboratory",
ipa: "/ˈlæbrətɔːri/",
correct: "laboratory",
explanation: "The audio was 'laboratory' /ˈlæbrətɔːri/, a place for scientific experiments."
},
word: "psychology",
ipa: "/saɪˈkɑːlədʒi/",
correct: "psychology",
explanation: "The audio was 'psychology' /saɪˈkɑːlədʒi/, the study of the mind and
behavior."
},
word: "renaissance",
ipa: "/ˈrenəsɑːns/",
correct: "renaissance",
},
word: "bourgeoisie",
ipa: "/ˌbʊr����wɑːˈziː/",
correct: "bourgeoisie",
explanation: "The audio was 'bourgeoisie' /ˌbʊrʒwɑːˈziː/, the middle class in society."
},
{
word: "pharmaceutical",
ipa: "/ˌfɑːrməˈsuːtɪkəl/",
correct: "pharmaceutical",
},
word: "protagonist",
ipa: "/proʊˈtæɡənɪst/",
correct: "protagonist",
explanation: "The audio was 'protagonist' /proʊˈtæɡənɪst/, the main character in a story."
},
word: "colleague",
ipa: "/ˈkɑːliːɡ/",
correct: "colleague",
explanation: "The audio was 'colleague' /ˈkɑːliːɡ/, a person you work with."
},
word: "queue",
ipa: "/kjuː/",
correct: "queue",
explanation: "The audio was 'queue' /kjuː/, a line of people waiting. It sounds identical to
'cue' but has different spelling."
},
word: "genre",
ipa: "/ˈʒɑːnrə/",
correct: "genre",
explanation: "The audio was 'genre' /ˈʒɑːnrə/, a category of artistic composition. Note the
French pronunciation."
},
word: "debris",
ipa: "/dəˈbriː/",
correct: "debris",
explanation: "The audio was 'debris' /dəˈbriː/, scattered pieces of waste or remains. The
's' is silent."
],
section3: [
word: "analysis",
ipa: "/əˈnæl��sɪs/",
correct: "a-NAL-y-sis",
},
word: "economics",
ipa: "/ˌiːkəˈnɑːmɪks/",
correct: "ec-o-NOM-ics",
},
word: "temperature",
ipa: "/ˈtemprətʃər/",
correct: "TEM-per-a-ture",
},
word: "photographer",
ipa: "/fə��tɑːɡrəfər/",
correct: "pho-TOG-ra-pher",
},
word: "civilization",
ipa: "/ˌsɪvələˈzeɪʃən/",
correct: "civ-i-li-ZA-tion",
},
word: "necessary",
ipa: "/ˈnesəseri/",
correct: "NEC-es-sar-y",
},
word: "understand",
ipa: "/ˌʌndərˈstænd/",
correct: "un-der-STAND",
options: ["UN-der-stand", "un-DER-stand", "un-der-STAND", "All equal stress"],
},
word: "development",
ipa: "/dɪˈveləpmənt/",
correct: "de-VEL-op-ment",
},
word: "intelligence",
ipa: "/ɪnˈtelɪdʒəns/",
correct: "in-TEL-li-gence",
},
word: "characterization",
ipa: "/ˌkærəktəraɪˈzeɪʃən/",
correct: "char-ac-ter-i-ZA-tion",
};
let currentQuestionIndex = 0;
let score = 0;
let answered = false;
if ([Link]) {
[Link]({
defaultConfig,
onConfigChange: updateContent,
mapToCapabilities: () => ({
recolorables: [],
borderables: [],
fontEditable: undefined,
fontSizeable: undefined
}),
])
});
setupEventListeners();
function updateContent(config) {
[Link]('quiz-title').textContent = config.quiz_title ||
defaultConfig.quiz_title;
[Link]('footer-text').textContent = config.footer_text ||
defaultConfig.footer_text;
function setupEventListeners() {
if (btn) {
startSection(section);
});
[Link]('next-btn').addEventListener('click', nextQuestion);
[Link]('restart-btn').addEventListener('click', resetQuiz);
function startSection(section) {
currentSection = section;
currentQuestionIndex = 0;
score = 0;
answered = false;
[Link]('.section-btn').forEach(btn => {
});
[Link]('section-selector').[Link] = 'none';
[Link]('quiz-container').[Link]('active');
[Link]('results-container').[Link]('show');
loadQuestion();
function loadQuestion() {
answered = false;
[Link]('question-number').textContent = `Question $
{currentQuestionIndex + 1} of ${[Link]}`;
[Link]('progress-fill').[Link] = `${progress}%`;
[Link]('next-btn').[Link]('show');
loadSection1Question(question);
loadSection2Question(question);
loadSection3Question(question);
function loadSection1Question(question) {
const content = `
<div class="word-display">
<div class="word-text">${[Link]}</div>
</div>
`;
[Link]('question-content').innerHTML = content;
const optionsHtml = [Link]((option, index) => {
return `
<span class="option-letter">${letter}</span>
</button>
`;
}).join('');
[Link]('options-grid').innerHTML = optionsHtml;
[Link]('.option-btn').forEach(btn => {
if (!answered) {
});
});
function loadSection2Question(question) {
const content = `
<div class="audio-display">
<span>Play Audio</span>
</button>
</div>
`;
[Link]('question-content').innerHTML = content;
return `
<span class="option-letter">${letter}</span>
</button>
`;
}).join('');
[Link]('options-grid').innerHTML = optionsHtml;
[Link]('.option-btn').forEach(btn => {
[Link]('click', () => {
if (!answered) {
});
});
function loadSection3Question(question) {
<div class="word-display">
<div class="word-text">${[Link]}</div>
</div>
`;
[Link]('question-content').innerHTML = content;
return `
<span class="option-letter">${letter}</span>
</button>
`;
}).join('');
[Link]('options-grid').innerHTML = optionsHtml;
[Link]('.option-btn').forEach(btn => {
[Link]('click', () => {
if (!answered) {
});
});
if ('speechSynthesis' in window) {
[Link]();
let utterance;
if (section == 1) {
[Link] = 'en-US';
if () {
[Link] = 0.80;
[Link] = 1.0;
[Link] = 1.0;
} else if ([Link]('-wrong1')) {
[Link] = 0.85;
[Link] = 1.08;
} else if ([Link]('-wrong2')) {
[Link] = 0.82;
[Link] = 0.96;
} else if ([Link]('-wrong3')) {
[Link] = 0.87;
[Link] = 1.02;
} else {
[Link] = 'en-US';
[Link] = 0.78;
[Link] = 1.0;
[Link](utterance);
answered = true;
if (isCorrect) {
score++;
[Link]('disabled');
[Link]('show-correct');
});
[Link]('feedback-title').innerHTML = isCorrect
? '✅ Correct!'
: '❌ Incorrect';
[Link]('feedback-explanation').textContent = explanation;
[Link]('next-btn').[Link]('show');
function nextQuestion() {
currentQuestionIndex++;
loadQuestion();
} else {
showResults();
function showResults() {
[Link]('quiz-container').[Link]('active');
icon = '📚';
icon = '���';
icon = '🌟';
[Link]('results-icon').textContent = icon;
[Link]('results-score').textContent = `${score}/${totalQuestions}`;
[Link]('results-message').textContent = message;
[Link]('results-container').[Link]('show');
}
function resetQuiz() {
currentSection = null;
currentQuestionIndex = 0;
score = 0;
answered = false;
[Link]('section-selector').[Link] = 'grid';
[Link]('quiz-container').[Link]('active');
[Link]('results-container').[Link]('show');
[Link]('.section-btn').forEach(btn => {
[Link]('active');
});
[Link]('DOMContentLoaded', init);
</script>
</html>