Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

HTML CSS JS

Total questions: 20

Worksheet time: 10mins

Name
Class
Date
1.
HTML tags are enclosed with in which of the following brackets?
a)
Curly brackets {}
b)
brackets ()
c)
square brackets []
d)
angular brackets <>
2.
All Tags are HTML mandatory requires a closing tag?
a)
true
b)
false
3.
Header with largest size is displayed using which Header tag?
a)
<H1>
b)
<H6>
c)
<H5>
d)
<H4>
4.
_________ lets the browser know how the document should be interpreted
a)
<!DOCTYPE html>
b)
<html>
c)
<head>
d)
<link>
5.
which property is used to add space around the content and border?
a)
margin
b)
span
c)
padding
d)
position
6.
which attribute is used to refer to the source file and its location in img tag
a)
href
b)
src
c)
ref
d)
rel
7.
Which tag is used to make a list of un ordered grocery list
a)
<OL>
b)
<UL>
c)
<DT>
d)
<DD>
8.
How to change the below code to inline CSS code <p><font color = "green" size = "5">Hello, World!</font></p>
a)
<p style = "font-color:green; font-size:24px;" >Hello, World!</p>
b)
<p style = "color:green; font-size:24px;" >Hello, World!</p>
c)
<p style = "font color:green, size:24px;" >Hello, World!</p>
d)
<p style = "color:green; size:24px;" >Hello, World!</p>
9.
What is the extension of Stylesheet files?
a)
.style
b)
.ss
c)
.css
d)
.cst
10.

Which of the below options is correct to change the background color to blue in CSS?

a)

body {

background-colour: lightblue;

}

b)

body {

background-color: lightblue;

}

c)

body {

background:color: lightblue;

}

d)

None of the above

11.
How do we comment a statement in CSS?
a)
By using //
b)
By using /* */
c)
By using //* *//
d)
None of the above
12.
Which of the following properties is used to specify the kind of border to display?
a)
border
b)
border:style
c)
border-style
d)
None of the above
13.
How is external CSS added?
a)
Within the link element, outside the head section
b)
Within the link element, inside the head section
c)
Within the external element, outside the head section
d)
We can not add CSS sheet externally
14.
Inline styles are defined within the "style" attribute of the relevant element.
a)
true
b)
false
15.

Predict the output for the piece of code:


<html>

<body>


<script language="JavaScript">

function Test(){

document.write("Hello World!");

}

</script>


<input type="submit" value="click here" onclick="Test()"/>


</body>

</html>

a)

Error

b)

Displays Hello World! Along with clickhere button

c)

Displays Hello World! after clicking on clickhere button

d)

Displays nothing

16.
JavaScript uses the + operator for both addition and concatenation.
a)
true
b)
false
17.
Which of the below keywords is used to define a function in JavaScript?
a)
fun
b)
function
c)
Function
d)
None of the above
18.

Predict the output:


<p id="test"></p>

<script>

var date = 10;

month = "July";

var year = 2020;


document.getElementById("test").innerHTML =

date + "<br>" + month + "<br>" + year

</script>

a)

No output

b)

44022

c)

10

July

2020

d)

10

2020

19.

Predict the output:


<!DOCTYPE html>

<html>

<body>


<p id="test"></p>


<script>

function firstFunction(p1, p2) {

return p1 + p2;

}

document.getElementById("test").innerHTML = firstFunction(1, 5);

</script>


</body>

</html>

a)

6

b)

No output

c)

Error while declaring the function

d)

None of the above

20.
Is it mandate to call the function in JS to get that executed?
a)
Yes
b)
No