Make a JavaScript Dice Game
Dice Game File Structure
The file structure is how you organize the files in your website. Here is our project's file structure:
Mouse Hover over the ➼ blue text in the description to highlight. dice
images
index.html
style.css
➼ Main Project Folder
➼ images - This is the folder that contains images used to create the dice game.
➼ index.html - This is the main page users will be directed to when entering your web address. HTML is the markup language that displays your content in the web browser. Our index.html file also contains the JavaScript used for the game.
➼ style.css - CSS formats HTML: color, size, shape, font ect.
➼ images - This is the folder that contains images used to create the dice game.
➼ index.html - This is the main page users will be directed to when entering your web address. HTML is the markup language that displays your content in the web browser. Our index.html file also contains the JavaScript used for the game.
➼ style.css - CSS formats HTML: color, size, shape, font ect.
CSS
Our JavaScript Dice Game uses a little bit of CSS. Click here for CSS tutorials.
Click here to learn about the responsive CSS used in this tutorial..
Project Code
************************
index.html
*************************
index.html
*************************
************************
style.css
*************************
style.css
*************************
Wanna add scoring to your game?
Watch Video 2: Keeping Score - JavaScript Dice Game v1.5
JavaScript Dice Game Version 2
In version 2 we add a high score list! Continue to JavaScript Dice Game V2 or go back to learn about JavaScript random numbers?