Free Download HTML Game Roll Dice game with source code

3220 View
58 Downloads

This game has a number of different names, but growing up we just called it “the dice game.” The name comes from the fact that all you need to play it are six dice, which makes it absolutely perfect to pull out anytime you just really need people occupied for a while

 

Dice Game with HTML javascript

 

This game is developed by using the HTML, css and Javascript languages

We have three files

dice.html

dice.css

dice.js

 

How to run Dice game

Download zip file

Extract downloaded file, there you will find above three files

Now open dice.html file in your favourite browser

Now you can play the Dice game

 

UI code is like below

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Roll Dice</title>
    <link rel="stylesheet" href="dice.css">
</head>
<body>
<div class='container'>
    <h1 class='h1'>Player <span class='player-turn'></span> Turn</h1>
    <div class='roll-dice'>
        <div class='score-counter'>
            <div class='player'>
                Score: <span class='player1-score'>0</span>
            </div>
            <div class='player'>
                Score: <span class='player2-score'>0</span>
            </div>
        </div>
        <div class='dice-output'>
            <div class='dice output1'>0</div>
            <div class='dice output2'>0</div>
        </div>
        <button class='play-button'>Roll Dice ????</button>
    </div>
</div>
<footer>

</footer>

<script src='dice.js'></script>
</body>
</html>

 

 

Project Details

Project Type :  Game Application
Development Technologies :  HTML, CSS, Javascript
Tags :  HTML, CSS, HTML Games, Javascript
Updated On :  2021-08-14
project Source Code Link :   Download Here
More Projects
Java project
PHP project
C# .NET project
Android project
VB project
Node JS project
HTML CSS project
Java Servlet project
Python project
VB .NET project
JSP project
Laravel PHP project
IoT Raspberry Pi project
C/C++ project
ASP .NET project
AngularJS project
Java Spring Framework project
Codeigniter PHP project
Hibernate framework project
javascript project
Swift project
Titanium project
SQL Database project