Learn to Code via Tutorials on Repl.it!

← Back to all posts
Monty Hall Game (html basic)
EliasAraniva (1)

Monty Hall Game

Sorry for my english but using google translate is torture
first we make sure to put the element of

 <html>

now we give our page a title:

<title> Monty Hall Game </title>

now write the following code

 <h3>The Monty Hall Game Show</h3>
 <p>Choose a door!</p>
 <a>Door 1</a>
 <a>Door 2</a>
 <a>Door 3</a>
</body>

Now we will create multiple files first-door.html second-door.html third-door.html

Index html

<html>
 <body>
  <h3>The Monty Hall Game Show</h3>
  <p>Choose a door!</p>
  <a href="/first-door.html">Door 1</a>
  <a href="/second-door.html">Door 2</a>
  <a href="/third-door.html">Door 3</a>
 </body>
</html>

First Door

<html>
 <body>
  <a href="/index.html">Reset</a>
  <h3>The Monty Hall Game Show</h3>
  <p>You won nothing!</p>
  <img src="/img/empty.png">
 </body>
</html>

Second Door

<html>
 <body>
  <a href="/index.html">Reset</a>
  <h3>The Monty Hall Game Show</h3>
  <p>You won a car</p>
  <img src="/img/car.png">
 </body>
</html>

Third Door

<html>
 <body>
  <a href="/index.html">Reset</a>
  <h3>The Monty Hall Game Show</h3>
  <p>You won a cat</p>
  <img src="/img/cat.png">
 </body>
</html>
Comments
hotnewtop
Bookie0 (6031)

You should add a repl so we can see the final result. Also add syntax highlighting by putting html after the 3 backticks (`):

<!doctype html>
<html>
 <body>
  <a href="/index.html">Reset</a>
  <h3>The Monty Hall Game Show</h3>
  <p>You won a cat</p>
  <img src="/img/cat.png">
 </body>
</html>