",
correct: "b",
},
{
question: "Question 2: Choose the attribute used to provide accessbility by configuring a text alteration that is available to browsers and other user agents that do not support graphics",
a: "alt",
b: "txt",
c: "src",
d: "none of the above",
correct: "a",
},
{
question: "Question 3: Use the ____________ property to resize or scale the4 background image.",
a: "background-image",
b: "background-clip",
c: "background-ongin",
d: "background-size",
correct: "d",
},
{
question: "Question 4: Choose the item below that describes the process of creating an image with the lowest file size that still renders a good quality image",
a: "validation",
b: "multimedia",
c: "optimization",
d: "bandwidth",
correct: "b",
},
];
const quiz = document.getElementById('quiz')
const answerEls = document.querySelectorAll('.answer')
const questionEl = document.getElementById('question')
const optiona = document.getElementById('optiona')
const optionb = document.getElementById('optionb')
const optionc = document.getElementById('optionc')
const optiond = document.getElementById('optiond')
const submitBtn = document.getElementById('submit')
let currentQuiz = 0
let score = 0
loadQuiz()
function loadQuiz() {
deselectAnswers()
const currentQuizData = quizData[currentQuiz]
questionEl.innerText = currentQuizData.question
optiona.innerText = currentQuizData.a
optionb.innerText = currentQuizData.b
optionc.innerText = currentQuizData.c
optiond.innerText = currentQuizData.d
}
function deselectAnswers() {
answerEls.forEach(answerEl => answerEl.checked = false)
}
function getSelected() {
let answer
answerEls.forEach(answerEl => {
if (answerEl.checked) {
answer = answerEl.id
}
})
return answer
}
submitBtn.addEventListener('click', () => {
const answer = getSelected()
if (answer) {
if (answer === quizData[currentQuiz].correct) {
score++
}
currentQuiz++
if (currentQuiz < quizdata.length)="">
loadQuiz()
} else {
quiz.innerHTML = `
You answered ${score}/${quizData.length} questions correct: ${(score / quizData.length) * 100}%
`
}
}
})

Extracted text: First Name: dfs Last Name: dvfefwefw HTML Basics Question1. Select the tag used to place an image on a web page. Oka href > Student Name: dfs dvfefwefw O < img=""> O < image=""> O « graphic > Final grade: 50% Question2. Choose the attribute used to provide accessibility by configuring a text alternative that is Question Your Answer Correct Answer available to browsers and other user agents that do not support graphics. text alt O alt multimedia optimization O text O src O none of the above Question3. Use the property to resize or scale the background image. O background - image O background - clip O background - origin O background - size Question4. Choose the item below that describes the process of creating an image with the lowest file size that still renders a good quality image. O validation O multimedia O optimization O bandwidth Submit Author: First Name, Last Name; Assignment 3