I am trying to creat a html/css/javascript page that looks like this.... I am almost done but I need help debugging. I have an issue where it plays in a slide kind of and I need all the questions to...


I am trying to creat a html/css/javascript page that looks like this....





I am almost done but I need help debugging. I have an issue where it plays in a slide kind of and I need all the questions to be on the same page. Also, the final results are supposed to be on the right-hand side after the questions. So I cant figure out how to fix that. Also I can get the name to print with the score data at the end so I need help with that also.





If you could help me fix that would be great!!!





My current end result is supposed to look exactly like that picture above so if you could help me fix the final few things that would help me a lot.








Quiz










































HTML BASICS











Quiz
















































































CSS



body {


background-color: #F2D2BD;


}







JavaScript



const quizData = [


{


question: "Question 1: Select the tag used to display an image on a web page",


a: "< a="" href="">",


b: "",


c: "",


d: "",


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}%

`



}


}


})


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

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
Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here