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

Tell us what’s happening:

hi - I saw there was a post about this but the solution did not address my issue. Why am I getting the error
" Sorry, your code does not pass. You’re getting there. Your script element should have an opening tag."

As far as I can tell it does? I’ve tried moving it from the head to the body and vice versa, trying it with and without the ./, resetting the whole thing - I keep getting the error. Thank you!!

Your code so far

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

<!-- User Editable Region -->

    <title>RPG - Dragon Repeller</title>
  </head>
    <body>
    <main>
      <div id="game">
      </div>
    </main>
    <script src="./script.js"></script> 
  </body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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

What step are you actually on? What are the exact instructions for this step that you are actually on?

pasting from the tutorial:

Step 2

Now you can start writing your JavaScript. Begin by creating a script element. This element is used to load JavaScript into your HTML file. You should use an opening <script> and closing </script> tag.

When they phrase it like this, they don’t want any ‘content’ between the tags

2 Likes

lol oh wow. thank you for that!

You are very welcome

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