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

Tell us what’s happening:

Describe your issue in detail here.

Your code so far


<!-- User Editable Region -->

<!DOCTYPE html>
<html lang='en'>
<head>
  <meta charset='UTF-8'>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
   <link rel="stylesheet" href="styles.css">
  <title>RPG - Dragon Repeller<title>
</head>
<body>
  <div id='game'>

  </div>
</body>
</html>

<!-- User Editable Region -->

// Not sure why its not taking it but the error is: You should have a div element.
Your div element should have an id attribute with the value game.
Your div element should be within the body element.
// tests completed

//Any suggestions?

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 1

This issue has been coming up a lot on the forum.

It seems like the tests work if the code is formatted in a particular way

Here is how to solve it until the tests get updated.

Start with this basic HTML boilerplate with this formatting

Replace the title with the correct title of RPG - Dragon Repeller
Replace the script tag with the div element with id of game.
Make sure the opening and closing div tags are all in the same line and there is no space between the opening and closing div tags.

Then it should pass

3 Likes

I just noticed that your are using two opening tags here

Fix that, and it will pass

1 Like

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