Skip to content

Instantly share code, notes, and snippets.

@srdjanRakic
Last active November 29, 2019 12:51
Show Gist options
  • Save srdjanRakic/4b9e158dfcffda7f8d6734a902dd19c0 to your computer and use it in GitHub Desktop.
Save srdjanRakic/4b9e158dfcffda7f8d6734a902dd19c0 to your computer and use it in GitHub Desktop.
Build a Quiz App with HTML, CSS, and JavaScript

Build a Quiz App with HTML, CSS, and JavaScript

Quiz App

1. Create and Style the Home Page

Create the home page along with a good chunk of the necessary CSS.

I encourage you all to take a look at Emmet snippets for generating HTML and CSS.

Resources

2. Create and Style the Game Page

Create the Game Page and display static question and answer information.

3. Display Hard Coded Question and Answers

Load questions from a hard coded array and iterate through available questions as the use answers them.

Resources

4. Display Feedback for Correct/Incorrect Answers

Check the user's answer for correctness and display feedback to the user before loading the next question.

Resources

5. Create Head's Up Display (HUD)

Create a Heads Up Display (HUD) for our quiz app. This will display the user's score and current question number.

Resources

6. Create and Style the End Page

Create our End page where we will display the user's achieved score. This screen will provide a form for saving the score and links for playing again or going home.

Bonus

1. Save High Scores in Local Storage

Save and maintain a high scores array in Local Storage. To do this, we will need to use JSON.stringify() and JSON.parse() to convert our high score array to a string and visa versa.

Resources

2. Load and Display High Scores from Local Storage

Create our High Scores page. We will have to load the high scores from Local Storage, iterate through them, and display them on the screen.

Resources

3. Load Questions From Local JSON File

Move our sample questions from a hard coded array to an external .json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment