wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Intermediate level

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

How can we add a multiline comment in javascript?

a)

//

b)

/* */

c)

*/ /

d)

**//

2.

How can we select an element with a specific ID in CSS

a)

^

b)

.

c)

#

d)

None of the above

3.

Which tag is used to create internal javascript?

a)

<script>

b)

<link>

c)

<src>

d)

<html>

4.

What is the correct JavaScript syntax to change the content of the HTML element below?

<p id="demo">This is a demonstration.</p>

a)

document.getElementById('p').innerHTML = 'Hello World!';

b)

document.getElementById('demo').innerHTML = 'Hello World!';

c)

document.getElement('demo').innerHTML = 'Hello World!';

d)

#demo.innerHTML("Hello World";

5.

Is javascript a case-sensitive language?

a)

True

b)

False

6.

In the below code snippet, in what order will the margins be added?

p{

margin:25px 50px 75px 100px;

}

a)

top,right,bottom,left

b)

top,left,bottom,right

c)

top,bottom,right,left

d)

right,left,top,bottom

7.

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

a)

msg("hello world");

b)

msgbox("Hello World");

c)

alertbox("Hello world");

d)

alert("Hello World");

8.

Which type of CSS is used in the below code?

<p style="border:2px solid red;">

a)

Internal CSS

b)

External CSS

c)

Inline CSS

d)

None of the above

9.

What will be the output of the following CSS code snippet?

h1{

color: "green";

}

a)

Nothing happen

b)

Error occurs

c)

heading becomes dark-green

d)

heading becomes green

10.

What type of element <span> is?

a)

Block level

b)

Inline

c)

None