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

Similar to your #stats element, your #monsterStats element needs two span elements. Give them the class stat and give the first element the text Monster Name: and the second the text Health: . After the text in each, add a strong element with an empty nested span element. Give the first inner span element an id of monsterName and the second inner span element an id of monsterHealth .

I don’t know what error in my code :face_with_spiral_eyes:

my ans:



Monster Name:
Health: </span id=“monsterHealth”>

The Error showed :
Sorry, your code does not pass. Hang in there.

Your #monsterStats element should have two span elements.

Welcome to the forum @DhesiTheKing

So the forum can assist, please post your full code.

Use the following method to post code to the forum:

  1. On a separate line type three back ticks.
  2. On a separate line paste your code.
  3. On the last line type three back ticks. Here is a single back tick `

Happy coding

Hey there,

Please update the message to include your code. The code was too long to be automatically inserted by the help button.

When you enter a code, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

RPG - Dragon Repeller
XP: 0 Health: 100 Gold: 50
Go to store Go to cave Fight dragon
<span class="stat" <span class="stat" Monster Name: Health:

always wrong I don’t understand anymore please help me

Hi!

      <div id="monsterStats">
        <span class="stat">Monster Name: <strong><span id="monsterName"></span></strong></span>
        <span class="stat">Health: <strong><span id="monsterHealth"></span></strong></span>
      </div>

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