Learn Basic JavaScript by Building a Role Playing Game - Step 1

Tell us what’s happening:

Step 1

JavaScript is a powerful language which allows you to build websites that are interactive.

To get started, create your standard HTML boilerplate with a DOCTYPE, html, head, and body, then add a meta tag for the charset. Add a title element and use the text RPG - Dragon Repeller for it. Include a link tag for your stylesheet to link the styles.css file.

Finally, create a div element with id set to game within your body.

Describe your issue in detail here.

Referring to step 1 mentioned above, all the code instructions were followed. However, when attempting to test the written codes below, a syntax error related to the ID attribute “Game” in the DIV element within the body code was encountered. Please advise.

Your code so far


<!-- User Editable Region -->

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
  </head>
<body>
    <div id="game">
    </div>
  </body>
</html>


<!-- User Editable Region -->

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36

Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 1

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

That’s odd. Try disabling any browser addons. Or change browsers and try again. Also, you can try resetting the step.

2 Likes

All is running fine now. Thank you!

1 Like