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

Tell us what’s happening:

I keep getting error saying I should put it in the div #game. But I did that and it still won’t let me pass. What am I doing wrong?

Your code so far

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

<!-- User Editable Region -->

  <body>
    <div id="#game">
      <div id="stats"></div>
      <div id="controls"></div>
      <div id="monsterStats"></div>
      <div id="text"></div>
    </div>
  </body>

<!-- User Editable Region -->

</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36

Challenge Information:

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

Hi there. The # is developer shorthand to say that the following value is the id of the element and not actually meant to be on the HTML page itself. It is also used in CSS selectors to target elements.

There are a lot of different ways to target elements such as by class and element type.

Hope this helps. :slight_smile:

More info on selectors.

Ok that helps thank you

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.