The Quiz

Brace yourself!

1. In which HTML element do we put in JavaScript code?

a. <js>
b. <script>
c. <body>
d. <link>

2. Which HTML attribute is used to reference an external JavaScript file?

a. src
b. rel
c. type
d. href

3. How would you write "Hello" in an alert box?

a. msg("Hello");
b. alertBox("Hello");
c. document.write("Hello");
d. alert("Hello");

4. JavaScript is directly related to the "Java" programming language

a. True
b. False