Originally published: 12/03/2018 13:54
Publication number: ELQ-89391-1
View all versions & Certificate

JavaScript Tutorial: Make a Quiz

This video will show you how to build an online quiz using JavaScript

This video requires a little basic knowledge of HTML and CSS but no knowledge of JavaScript. As such, this video is a complete beginners tutorial for how to use JavaScript to construct a webpage, and in Kevin's example, an online quiz.

This video begins by demonstrating the desired outcome of the JavaScript programming, showing the end product of the online quiz and how it should function. Then, Kevin shows how you should lay out your JavaScript editor in three tabs in order to ease the process. These tabs will be used as your index, a main writing file in which you can write your JavaScript code and finally a style file for your CSS.

Kevin then explains how you can use HTML forms to allow you to create forms with text input boxes and radio buttons and how this can be inputted into your code. This will show you how to create a series of questions, with both multiple choice and text input solutions and input them into your webpage. Kevin then begins to explain how you can use JavaScript coding in order to create different functions within your webpage like alerts. This will allow you to create different web page functions depending on whether or not certain buttons are clicked, making your webpage far more interactive with its user.

Kevin then explains how you can use variables in your JavaScript code in order to create different outcomes on your webpage quiz dependant on the answers inputted by the user. For instance, if the user were to get 1 question out of 3 correct, Kevin shows you how you can use JavaScript code to get this information to be displayed on the webpage once the answers have been submitted. This will show you how to use JavaScript to show the user their quiz score.

The video will then show you how you can use custom messages and pictures in your webpages to create a more personalised and interactive user interface. Kevin demonstrates how to use arrays within JavaScript to achieve this.

Ultimately, this beginners YouTube tutorial will give you the tools needed to create a simple yet effective web page quiz. Kevin also shows how you can use JavaScript to make your web page interactive and fun, helping you to use JavaScript in collaboration with HTML and CSS to create a page that meets all of your needs.

35 mins 41

This Best Practice includes
1 Video File

Add to bookmarks

0.0 / 5 (0 votes)

please wait...