wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML & Java

Total questions: 12

Worksheet time: 11mins

Name
Class
Date
1.

The three main languages of the web are HTML, CSS and __________ ?

a)

Jove

b)

Java

c)

Jana

d)

Jane

2.

For JavaScript to be read by the browser, it is inserted specifically between which tags?

a)

html

b)

head

c)

body

d)

script

3.

What is at the end of a line of JavaScript code?

a)

#

b)

)

c)

;

d)

>

4.

What does this javascript code snippet do?

<input type="button" value="Submit" onclick="run()">

a)

The code does nothing

b)

An image appears on screen

c)

Runs a piece of code when a button is clicked

5.

In JavaScript Var stands for Variable. True or False

a)

True

b)

False

6.

What are the values of the variables number 1 and number 2

a)

input & output

b)

<script> and </script>

c)

13 & 15

7.

What does this code snippet do:


<input type="button" value="Submit" onclick="run()">

a)

Nothring

b)

Runs a program once a button is clicked

c)

Creates a value

d)

Inputs a name

8.

<script>

function run()

{

var firstword = "Good"

var secondword = "Morning"

var thirdword = "Class"

alert(firstword + " " + secondword + " " + thirdword);

}

</script>


What does "function run ()" in this code snippet .

a)

Nothing

b)

Runs the program below it

c)

Closes brackets

d)

Asks for an input

9.

What does the code snippet below do?


<input type="number" name="number" id="num1">

a)

Asks for id

b)

Nothing

c)

Allows the user to input a number

d)

Allows the user to input a name

10.

The code in the picture calculates?

a)

The width of an individual

b)

The height of an individual

c)

The volume of for example a swimming pool

d)

Nothing

11.

Create a webpage which asks for height, width and length of a box, then, when a button is pressed, displays the volume of the box in an alert box.


You can use notepad. Copy and paste your code here.

4 lines
12.

Create a webpage with a button which when pressed, displays your favourite colour in a pop-up window.


Use notepad. Copy and paste your code here.

4 lines