wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Recap on JavaScript and HTML

Total questions: 18

Worksheet time: 22mins

Name
Class
Date
1.

Inside which HTML element do we put the JavaScript

a)

<scripting>

b)

<script>

c)

<js>

d)

<javascript>

2.

Where is the correct place to insert a JavaScript?

a)

<body>

b)

<head>

c)

<body>, <head>

d)

html

3.

Which of these is a method?

a)

getElementById( )

b)

style

c)

document

d)

color

4.

Where is the correct place to insert a JavaScript?

a)

The <head> section

b)

Both the <head> section and the <body> section are correct

c)

The <body> section

5.

How do you write "Hello World" in an alert box?

a)

msg("Hello World");

b)

alert("Hello World");

c)

alertBox("Hello World");

d)

msgBox("Hello World");

6.

How can you add a comment in a JavaScript?

a)

//This is a comment

b)

<!--This is a comment-->

c)

'This is a comment

7.

JavaScript is the same as Java.

a)

True

b)

False

8.

Which event occurs when the user clicks on an HTML element?

a)

onmouseover

b)

onmouseclick

c)

onchange

d)

onclick

9.

Is JavaScript case-sensitive?

a)

No

b)

Yes

10.
Which keyword do we need to define a function?
a)
function
b)
method
c)
onclick
d)
functionName()
11.

How can a developer show a pop-up message to the user?

a)

alert

b)

prompt

c)

console.log

d)

<p> tag

12.

A programming language used for webpage functionality such as interactivity, data processing, animation, and development of purpose built apps such as mobile and desktop apps and more.

a)

HTML5

b)

CSS

c)

JS

d)

C#

13.

Specify the name of JavaScript box that displays two buttons which are the OK and cancel buttons; it is not used to collect inputs.

4 lines
14.

What is the name of HTML list that formats list as numbered?

4 lines
15.

Specify the JavaScript event that triggers the script once the mouse is moved out of an HTML element

a)

onmouseout()

b)

onmouseover()

c)

onclick()

d)

onload()

16.

Is there a specific tag to create table columns?

4 lines
17.

What does CSS stand for?

4 lines
18.

write the correct HTML code to create a heading level 1 and has been assigned a class with the value "main".

4 lines