Dont understand what they mean


#1

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

tags.
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 + '!';

#2

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


#3

https://www.codecademy.com/en/courses/html-javascript-css/0/4#


#4

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

The provided code,

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

<body>

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

</body>

</html>

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.

#5

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

id="result

#6

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