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

Tell us what’s happening:

I’m getting an error where I’m told: Your div element should have an id attribute with the value game . Am I missing something?

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0

Challenge Information:

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

I copied and pasted your code exactly and am able to pass

You have a few options here.

  1. Reset the lesson and paste in your code again.
  2. Clear out the browser cache and try again
  3. Try another browser
  4. Or move onto step 2

Hope that helps

1 Like

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