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

hi guyz im struggling here with this code

Your code so far

XP:0

Health:100

Gold:50

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
</head>
<body>
    <div id="game">
        <div id="stats">
            <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>
        </div>
        <div id="controls">
            <button id="button1">Go to store</button>
            <button id="button2">Go to cave</button>
            <button id="button3">Fight dragon</button>
        </div>

<!-- User Editable Region -->

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

<!-- User Editable Region -->

        <div id="text"></div>
    </div>
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36

Challenge Information:

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

these needs a space inside the span after the colon, and then you need the other requested elements

pardon me guyz im a newbie to this language. so where do i put the empty span

inside the span element with class="stat"

this is my code but still not going through

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

strong element should be empty

i am completely lost on this one :roll_eyes:

Is there something still inside of your strong element?

this is my code at the moment
\

Monster Name: <Health:
[quote="Vinny-d, post:9, topic:660230, full:true"] this is my code at the moment ```
Monster Name: <Health:
``` [/quote]

thank you guyz got it rite :fist_right:

What’s going on with ‘Health’? It doesn’t look like what you did on the previous line

add empty another span element between strong element

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