Use Images with Questions
PreviousCustom Feedback Text for Individual QuestionsNextDisplay the Total Question Count at Welcome
Last updated
Last updated
If you want questions to display a particular image, like shown above, here are the basic steps.
index.html
style.css
code.js
images
question1image.png
question2image.png
You may want to place this right below your question, like the example at the top of this page.
You will want to add this right after trivia.insertQuestionInfo();
in your displayQuestion( ) function.
These styles will maintain the width of the image and center it on the screen. Change the styles as needed.
That's it. It should work for you now.