Dont understand what they mean

What do they mean by this? In the HTML tab, below the code, add start and ending

Add an attribute to the
as id=“result”.
In the JavaScript tab, inside the sayHello function, replace the alert code with: document.getElementById(“result”).innerHTML = 'Hello ’ + name + ‘!’;

Please post a link to the lesson, This doesn’t look like it is in the correct category.

This is not a track courses module so I’ve moved it to the Corner Bar.

The provided code,

    <script type="text/javascript" src="script.js"></script>


<button onclick="sayHello('world')">Click Me</button>



after the code would mean before the </body> tag. Just insert,

<div id="result"></div>

The first tag is known as the OPENTAG, where the attribute is written. The last tag is known as the ENDTAG, and never has any attributes.

id="result" is the attribute. It will be used as a `hook` in the script.

thank you. That was a very big help. i wrote the code wrong. i wrote it

1 Like

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