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

Tell us what’s happening:

I got this error message:
Your code should have a link element.
I don’t know what I’m missing for the code to work.

Your code so far


<!-- User Editable Region -->

<!DOCTYPE html>
<html lang="en">
  <head>
    <body>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
      <div id="game"></div>
    </body>
  </head>
</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

Your body element should not be inside the head element.
The head contains the metadata for the document (such as meta, link, title elements etc).
The body goes below the head and contains the actual document content (i.e. that which the user sees).

Although the error message you’re seeing is perhaps misleading, moving the body outside and below the head will fix the problem.

1 Like

Thank you so much !!

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