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

Tell us what’s happening:

What else do i need to do or what did I do wrong?

Your code so far

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

<!-- User Editable Region -->

  <div> <id ="stats"</div>
  <div> <id = "controls"</div>
  <div> <id = "monsterStats"</div>
  <div> <id = "text"</div>

<!-- User Editable Region -->


Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

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

Create four div elements within your #game element.

What happened to your your #game element?

1 Like

I’m not sure how to do that, I am a complete beginner.

1 Like

This was in the starting code.

<body>
  <div id="game">
  </div>
</body>

The new code you add goes inside the element with the game id.

The id attributes you added should be on the opening <div> tag, and not the closing </div> tag.

Example:

<body>
  <div id="game">
    <div id="someId"></div>
  </div>
</body>

Please complete the Responsive Web Design certification before starting the JavaScript certification

You should use the body element after head element.

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