wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

IWT_2024_Quiz

Total questions: 70

Worksheet time: 34mins

Name
Class
Date
1.
An attribute is a; 
a)
Applies changes to everything
b)
Different options for each tab
c)
Allows for no changes to the site
d)
Gives structure and text
2.
Style tags are used to;
a)
Apply style to one line
b)
Not used in HTML
c)
Used at the top of the page to apply a style to the entire document
d)
Used sparingly
3.
Which of the following is the largest heading? 
a)
h2
b)
h3
c)
h4
d)
h6
4.
<!DOCTYPE> 
a)
Defines the document type
b)
Defines a comment
c)
Defines the document's body
d)
Defines information about the document
5.
<a>
a)
Defines an article tag
b)
Defines an HTML link
c)
Defines the link destination 
d)
Defines the area
6.
Web Standards are decided on by who?
a)
Microsoft
b)
Apple
c)
W3C
d)
Google
7.
What is the proper code to insert an image named "frog.jpg"?
a)
<img src="frog" width="104" height="142">
b)
<img="frog.jpg" width="104" height="142">
c)
<img src="frog.jpg" width="104" height="142">
d)
<img ="frog" width="104" height"142">
8.
Which tag is used for making a horizontal line?
a)
<hor>
b)
<hr>
c)
<horizontal>
d)
<hl>
9.

To display writing on the screen you must include ___ in Java Script.

a)
Document Write
b)
documentWrite
c)
document.write( )
d)
document.write
10.

Which type of Statement can execute parameterized queries in JDBC?

a)

PreparedStatement

b)

ParameterizedStatement

c)

ParameterizedStatement and CallableStatement

d)

All kinds of Statements (i.e. which implement a sub interface of Statement)

11.

Which packages in java contain the JDBC classes?

a)

java.jdbc and javax.jdbc

b)

java.jdbc and java.jdbc.sql

c)

java.sql and javax.sql

d)

java.rdb and javax.rdb

12.

Select the method to get HTML form data into JSP?

a)

getParameter()

b)

request.getparameter()

c)

request.getParameter()

d)

request.getString()

13.

Java code is embedded under which tag in JSP?

a)

Expression

b)

Declaration

c)

Scriptlet

d)

Comment

14.
Which is of the following are valid expression tag for the given variables a and b?
a)

<%=a+b %>

b)

<%=a+b; %>

c)

<%!a+b %>

d)

<%!a+b; %>

15.
Which of the following is used to declare instance variable through JSP Page?
a)
<% int iVar=0; %>
b)
<%! int iVar=0; %>
c)
<%! int iVar=0 %>
d)
<%= int iVar=0; %>
16.

Predict the output: Provided uname text field with the value "Harry"


<html>

<body>

<%= "Welcome "+request.getParameter("uname") %>

</body>

</html>

a)

Welcome Harry

b)

Harry

c)

500 Internal Server Error : Null Pointer Exception

d)

JSP Translation Error: request not declared

17.

Which method is used to perform DML statements in JDBC?

a)

execute()

b)

executeQuery()

c)

executeUpdate()

d)

executeResult()

18.

To declare a JavaScript variable, you should NOT use?

a)

Let

b)

Var

c)

Const

d)

Int

19.

Inside which HTML element do we put the JavaScript

a)

<scripting>

b)

<script>

c)

<js>

d)

<javascript>

20.

Is JavaScript case sensitive language?

a)

Yes

b)

No

c)

Depends on the browser

d)

Depends on the platform

21.

Identify non-primitive datatype from the following?

a)

String

b)

Array

c)

number

d)

boolean

22.

What is the output of the following script?


function display() { document.writeln(10+20+"30"); } display();

a)

60

b)

30"30"

c)

3030

d)

102030

23.

What is proper syntax for declaring a array in JavaScript?

a)

var arrayName =[ ];

b)

var arrayName[ ] ={ };

c)

array arrayName ={ };

d)

obj var arrayName =[ ];

24.

String txt = "Hello World";

alert(txt.toUpperCase());


Choose the correct output.

a)

"HELLO WORLD"

b)

HELLO WORLD

c)

Hello world

d)

Hello World

25.

What will be the output of below code?


String statement = "Outfit of the day";

alert(statement.slice(3,6));

a)

it of

b)

tfit

c)

fit

d)

FIT

26.

What will be the output of below code?


String statement = "Outfit of the day";

alert(statement.slice(-7,-4));

a)

it of

b)

the d

c)

the

d)

FIT

27.

What will be the output of below code?


String statement = "Outfit of the day";

alert(statement.search(/o/i));

a)

7

b)

0

c)

6

d)

8

28.

What will be the output of below code?


String statement = "Outfit of the day";

alert(statement.indexOf("o",7));

a)

7

b)

0

c)

6

d)

8

29.

What will be the output of below code?


String statement = "Outfit of the day";

alert(statement.slice(7));

a)

it of

b)

tfit

c)

of the day

d)

FIT of the day

30.
Which of the following will create a column in an HTML table?
a)
<col>
b)
<td>
c)
<tcol>
d)
<data>
31.

A list block can be defined inside another list is called as ___________________

a)

Ordered list

b)

Nested list

c)

Definition list

32.

Unordered list is surrounded within _____________ tags.

a)

<ol>.........</ol>

b)

<ul>........</ul>

c)

<dl>........</dl>

33.

In ordered list, the default number style is ______________

a)

A,B,C,D........

b)

I,II,III,IV........

c)

1,2,3,4.............

34.
Name an element which doesn't have a closing tag.
a)
<img>
b)
<head>
c)
<body>
d)
<p>
35.
The following tag will show a bulleted list
a)
<ul>
b)
<ol>
c)
<li>
d)
<list>
36.
Which tag defines a numbered list?
a)
<OL>
b)
<UL>
c)
<LI>
d)
<NL>
37.
Which tag is used to underline text?
a)
<a>
b)
<u>
c)
<b>
d)
<I>
38.

What is DTD?

a)

a. Document type Determination

b)

b. Determination Type Defination

c)

c. Document Text Definition

d)

d. Document Type Definition

39.

comments in java script can be specified using

a)

<!-- comment -->

b)

<%-- comment --%>

c)

/*-- comment --*/

d)

#comment#

40.

function myFunction(a,b) {

var b=a;

return b * b;

}

if the above function called as:

var x = myFunction(4,5); what is the value of x?

a)

25

b)

9

c)

1

d)

16

41.

DOM stands for

a)

Dynamic object model

b)

Document object model

c)

Dynamic object method

d)

Document object method

42.

Style rules may be applied via ___ types of stylesheets.

a)

1

b)

2

c)

3

d)

None of the above

43.

Which property is used to change the background color?

a)

Bgcolor

b)

Bg-color

c)

Color

d)

Background-color

44.

Which of the following property is used to control the repetition of an image in the background?

a)

background-repeat

b)

background-color

c)

background-image

d)

background-position

45.

Which of the following declarations will turn the text in a paragraph to bold?

a)

font-weight: bold;

b)

font=bold;

c)

font-size: large;

d)

font-weight: normal;

46.

Which of the following is NOT a way to apply CSS properties to your website?

a)

The inline method

b)

The embedded method

c)

The outline method

d)

The external method

47.

Which of the following lines of code will correctly set the color of text inside a <h2> element to blue, when found in an external CSS file?

a)

h2 {color: blue;}

b)

h2 {text-color:blue;}

c)

style="h2:color,blue;"

d)

h2 text-color:blue

48.

Given a RGB value of #00FF00, what will be the resulting color on the screen?

a)

Red

b)

Blue

c)

Green

d)

A mixture of red, green and blue

49.

How do you create an inline style?

a)

Define a style rule in your < head > area

b)

Add a list of property attributes to the target element

c)

Add a “style” attribute to the target element

d)

Add a “css” attribute to the target element

50.

Which of the following codes sets the font size to 32pt using internal style sheet?

a)

<h1 style="font-size:32pt;"></h1>

b)

<h1 font-size="32pt"></h1>

c)

h1{font-size:32pt;}

d)

h1{size:32pt;}

51.

Which of the following codes sets the font to Arial using inline style sheet?

a)

<p font="Arial"></p>

b)

<p style="Arial"></p>

c)

<p style="font-family:Arial"></p>

d)

p{font-family:Arial;}

52.

When you use id selector

What should present infront of idname

a)

?

b)

@

c)

#

d)

.

53.

table, td {border:0}

a)

Shows no border around the table

b)

Shows no border with the table

c)

Shows no border around and within the table

54.

Structure of CSS code


A { B : C }


What is placed at A?

a)

tag

b)

value

c)

attribute

55.

The external CSS is linked to the HTML document in the _________

a)

<head> </head>

b)

<body> </body>

56.

Which CSS property is used to specify how long the transition effect to take place?

a)

transition-timing-function

b)

transition-property

c)

transition-delay

d)

transition-duration

57.

What is the syntax for defining keyframes in CSS?

a)

@keyframes

b)

keyframes{}

c)

keyframes()

d)

#keyframes

58.

What is the purpose of keyframe animations in CSS?

a)

The purpose of keyframe animations in CSS is to create smooth and dynamic animations with more control and customization.

b)

Keyframe animations in CSS are used to add text effects to web pages.

c)

Keyframe animations in CSS are used to create static and unchanging animations.

d)

Keyframe animations in CSS are used to make web pages load faster.

59.

What will be the output of the following code snippet?

<script type="text/javascript">
var a = 5;
var output = 5 + "9";
document.write(output);
</script>
a)

error

b)

14

c)

59

d)

non of these

60.

Which of the following is the correct CSS link tag?

a)

<link rel="styles" href="stylesheet.css">

b)

<link href="stylesheet">

c)

<link rel="stylesheet" src="styles.css">

d)

<link rel="stylesheet" href="styles.css">

61.

String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";


What is the correct way to find the length of "txt" string?

a)

var len = length(txt);

b)

var len = txt.length();

c)

var len = txt.length;

d)

var len = length(txt);

62.

What will be the output of below code?


String statement = "Outfit of the day and of the night";

alert(statement.replace(/o/g, "i"));

a)

Outfit if the day and if the night

b)

Outfit of the day and if the night

c)

Outfit if the day and of the night

d)

iutfit if the day and if the night

63.

Which method removes the last element from an array and returns that element?

a)

A) push()

b)

B) pop()

c)

C) shift()

d)

D) unshift()

64.

The Array.isArray() method returns true if the argument is an array, otherwise:

a)

A) It returns false

b)

B) It returns null

c)

C) It returns undefined

d)

D) It throws an error

65.

In JavaScript, what is a callback function?

a)

A function that is called automatically when a certain event occurs.

b)

A function that is passed as an argument to another function and is executed after some operation has been completed.

c)

A function that is called inside a loop.

d)

A function that is executed before any other function in a program.

66.

What method combines the text of two strings and returns a new string?

a)

A) append()

b)

B) merge()

c)

C) concat()

d)

D) combine()

67.

The charAt() method returns the character at a specified index within a string. If the index is out of range, what does it return?

a)

A) null

b)

B) undefined

c)

C) Empty string

d)

D) Error

68.

The trim() method removes whitespace from both ends of a string. Which of the following whitespace characters does it remove?

a)

A) Space

b)

B) Tab

c)

C) Newline

d)

D) All of the above

69.

What does the typeof operator return when used on an array?

a)

A) "array"

b)

B) "object"

c)

C) "undefined"

d)

D) "number"

70.

A function declaration consists of the following

a)

The function keyword.

b)

The name of the function, or its identifier, followed by parentheses.

c)

A function body enclosed in the function’s curly brackets, { }.

d)

a backtick inside console.log()