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

Tell us what’s happening:

Step 17 :
i still get this error “You should add a strong element in your first .stat element.”

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
    <script src="./script.js"></script>
    <div id="game">
      <div id="stats">

<!-- User Editable Region -->

  <strong><span class="stat">XP: </span></strong> <span id="xpText">0</span>
  <strong><span  class="stat">Health: </span></strong><span id="healthText">100</span>
  <strong><span  class="stat">Gold: </span></strong><span id="goldText">100</span>



<!-- User Editable Region -->

      <div id="controls"></div>
      <div id="monsterStats"></div>
      <div id="text"></div>
/* file: script.js */
let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;
let fighting;
let monsterHealth;
let inventory = ["stick"];

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

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

Welcome to the forum

Please reset the step to restore the original code.

Then start nesting the elements around the numbers.

Happy coding

I am having the same problem. How can I fix it?

Hi! Start a new topic, describe your issue, share your code, there’s no other way :slight_smile:

    <span class="stat">XP: <strong><span id="xpText">0</span></strong></span>
    <span class="stat">Health: <strong><span id="healthText">100</span></strong></span>
    <span class="stat">Gold: <strong><span id="goldText">50</span></strong></span>

Posting solutions is not allowed here on the forum