wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Web Technology Lab (BCS552) - Internal Exam

Total questions: 100

Worksheet time: 50mins

Name
Class
Date
1.

Which protocol is primarily used for transferring web pages over the Internet?

a)

FTP

b)

HTTP

c)

SMTP

d)

IMAP

2.

What does HTML stand for?

a)

Hyperlinks and Text Markup Language

b)

Hyper Text Markup Language

c)

Hyper Tool Markup Language

d)

Hyper Transfer Markup Language

3.

Which of the following is not an Internet service?

a)

Email

b)

File Transfer

c)

Word Processor

d)

Chat

4.

Who is known as the father of the World Wide Web?

a)

Bill Gates

b)

Tim Berners-Lee

c)

Vint Cerf

d)

Larry Page

5.

Which protocol is used for sending email?

a)

SMTP

b)

FTP

c)

HTTP

d)

SNMP

6.

The main advantage of client-server computing is:

a)

Reduced redundancy

b)

Centralized resources

c)

Faster manual calculations

d)

Offline functionality

7.

Which layer of the Internet protocol model is responsible for routing packets?

a)

Application

b)

Transport

c)

Network

d)

Data Link

8.

Which of the following is a strategy for web development?

a)

Planning

b)

Design

c)

Implementation

d)

All of the above

9.

Which of the following is not a protocol governing the web?

a)

HTTP

b)

FTP

c)

HTML

d)

HTTPS

10.

The first website went online in which year?

a)

1989

b)

1991

c)

1995

d)

1998

11.

A web project is usually documented using:

a)

UML diagrams

b)

Spreadsheets

c)

Presentation slides

d)

Flowcharts only

12.

Which of the following is not an Internet tool?

a)

Web Browser

b)

Email Client

c)

Database Server

d)

FTP Client

13.

Which service allows real-time online communication?

a)

FTP

b)

Telnet

c)

Chat

d)

SMTP

14.

Connecting a computer to the Internet requires:

a)

Modem or Router

b)

Hard Disk

c)

Printer

d)

Scanner

15.

Which of the following is an example of client-server architecture?

a)

Peer-to-peer network

b)

Web-based email service

c)

Standalone desktop application

d)

None of the above

16.

Which of the following is true about DOM in XML?

a)

Reads document sequentially

b)

Loads entire document in memory

c)

Cannot modify XML

d)

Only works with HTML

17.

The tag is used in HTML to:

a)

Display images

b)

Create forms and take input

c)

Display tables

d)

Style text

18.

Which HTML tag is used to display a table cell?

a)

<tr>

b)

<td>

c)

<table>

d)
  1. <th>

19.

Which of the following is used for XML validation?

a)

DTD

b)

CSS

c)

HTML

d)

FTP

20.

SAX parser in XML is:

a)

Memory efficient

b)

Loads entire XML in memory

c)

Cannot parse large XML

d)

Deprecated

21.

What is the main difference between DOM and SAX?

a)

DOM is event-driven, SAX loads entire document

b)

DOM loads entire document, SAX is event-driven

c)

DOM cannot modify XML

d)

SAX cannot parse XML

22.

Which tag is used to create an unordered list in HTML?

a)

<ol>

b)

  • <ul>

c)

<li>

d)

<list>

23.

Which tag is used to define a table header?

a)

<th>

b)

<td>

c)

<tr>

d)

<table>

24.

The tag in HTML is used to:

a)

Add images

b)

Create links

c)

Collect user input

d)

Define a table

25.

Which HTML tag is used to create a frame?

a)

<frame>

b)

<iframe>

c)

<frameset>

d)

Both A & C

26.

What does CSS stand for?

a)

Computer Style Sheets

b)

Creative Style Sheets

c)

Cascading Style Sheets

d)

Colorful Style Sheets

27.

Which HTML tag is used to define an internal CSS?

a)
  1. <css>

b)
  1. <script>

c)
  1. <style>

d)
  1. <link>

28.

Which property is used to change the background color of an element?

a)

color

b)

bgcolor

c)

background-color

d)

bg-color

29.

What is the default position value of an HTML element?

a)

absolute

b)

relative

c)

static

d)

fixed

30.

Which CSS property controls the text size?

a)

text-style

b)

font-size

c)

font-weight

d)

text-decoration

31.

Which CSS property is used to make text bold?

a)

font-weight

b)

text-weight

c)

font-style

d)

font-variant

32.

Which CSS property adds space inside the border of an element?

a)

margin

b)

padding

c)

border-spacing

d)

outline

33.

What is the correct CSS syntax to select an element with id="header"?

a)

.header

b)

#header

c)

header

d)

*header

34.

Which CSS property is used to control the space between lines of text?

a)

line-height

b)

text-spacing

c)

spacing

d)

text-height

35.

Which CSS property is used to change the text color of an element?

a)

color

b)

text-color

c)

font-color

d)

text-style

36.

Which property specifies the width and height of elements?

a)

dimension

b)

size

c)

width & height

d)

display-size

37.

Which property allows you to hide overflow content of an element?

a)

overflow: hidden

b)

overflow: scroll

c)

overflow: auto

d)

overflow: visible

38.

Which property is used to style links differently based on their state?

a)

pseudo-class

b)

attribute selector

c)

grouping

d)

class selector

39.

Which CSS technique is used to combine multiple selectors to share styles?

a)

Grouping

b)

Nesting

c)

Inheritance

d)

Pseudo-class

40.

Which property aligns an element vertically inside its container?

a)

vertical-align

b)

text-align

c)

align

d)

position

41.

What is an element vertically inside its container?

a)

vertical-align

b)

text-align

c)

align

d)

position

42.

Which of the following is a valid way to declare a JavaScript variable?

a)

var x;

b)

let x;

c)

const x;

d)

All of the above

43.

Which symbol is used for single-line comments in JavaScript?

a)

/* */

b)

//

c)

###

d)

##

44.

What is the correct syntax to write a function in JavaScript?

a)

function myFunc() {}

b)

func myFunc() {}

c)

def myFunc() {}

d)

function: myFunc() {}

45.

Which JavaScript method is used to write text to the HTML document?

a)

document.write()

b)

document.output()

c)

document.show()

d)

document.print()

46.

What does document.getElementById("demo") return?

a)

The HTML element with id="demo"

b)

The value of id="demo"

c)

A CSS style of element demo

d)

Undefined

47.

Which of the following is used to submit a form without reloading the page?

a)

JavaScript

b)

AJAX

c)

HTML

d)

CSS

48.

Which object represents the HTML document in JavaScript?

a)

window

b)

document

c)

body

d)

element

49.

Which of these is not a JavaScript data type?

a)

Boolean

b)

Number

c)

Float

d)

String

50.

How do you call a function named myFunction in JavaScript?

a)

call myFunction();

b)

myFunction();

c)

call function myFunction();

d)

execute myFunction();

51.

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

a)

onmouseover

b)

onchange

c)

onclick

d)

onload

52.

Which protocol ensures reliable data transmission?

a)

UDP

b)

TCP

c)

IP

d)

ICMP

53.

Which of the following is a valid URL in Java?

a)

http://www.example.com

b)

ftp://ftp.example.com

c)

file:///C:/example.txt

d)

All of the above

54.

Which method returns the content of a URL in Java?

a)

URL.getContent()

b)

URL.open()

c)

URL.read()

d)

URL.fetch()

55.

Which method of InetAddress checks if a host is reachable?

a)

isReachable()

b)

checkHost()

c)

ping()

d)

reach()

56.

Which protocol does ServerSocket use by default?

a)

TCP

b)

UDP

c)

HTTP

d)

IP

57.

Which Java class is used to parse URLs?

a)

URL

b)

URI

c)

Socket

d)

InetAddress

58.

Which method returns the port number of a socket?

a)

getPort()

b)

getSocketPort()

c)

port()

d)

getLocalPort()

59.

Which method returns the local port of a server socket?

a)

getPort()

b)

getLocalPort()

c)

getSocketPort()

d)

getServerPort()

60.

Which of the following is true about TCP sockets?

a)

Connection-oriented

b)

Reliable

c)

Stream-based

d)

All of the above

61.

Which method returns the IP address as a string in InetAddress?

a)

getHostAddress()

b)

toString()

c)

getIP()

d)

getAddress()

62.

What is the main purpose of JavaBeans in Java?

a)

To store data only

b)

To provide reusable software components

c)

To create web pages

d)

To manage database connections

63.

Which method is automatically called when a JavaBean is initialized?

a)

start()

b)

init()

c)

constructor

d)

create()

64.

Which of the following is not a feature of JavaBeans?

a)

Serializable

b)

No-argument constructor

c)

Encapsulation using properties

d)

Can extend multiple classes

65.

What are JavaBeans properties accessed through?

a)

Direct variable access

b)

Getter and setter methods

c)

Static methods only

d)

Constructor arguments

66.

Which of the following is a valid property type in JavaBeans?

a)

Only primitive data types

b)

Only object types

c)

Any type including primitive and object

d)

Only String

67.

What is a key characteristic of a Stateful Session Bean?

a)

Maintains client state across multiple method calls

b)

Does not maintain client state

c)

Only interacts with databases

d)

Cannot be used in EJB

68.

What is a key characteristic of a Stateless Session Bean?

a)

Maintains state across multiple clients

b)

Does not maintain any client-specific state

c)

Only used for database entities

d)

Can never be transactional

69.

Which interface must a Stateless Session Bean implement?

a)

SessionBean

b)

EntityBean

c)

MessageDrivenBean

d)

None, just annotate with @Stateless

70.

Entity Beans represent:

a)

Business logic only

b)

Persistent data stored in a database

c)

Only transient objects

d)

User interface components

71.

Which annotation is used to define a Stateless Session Bean in EJB 3.0+?

a)

@Stateful

b)

@Stateless

c)

@Entity

d)

@EJB

72.

Node.js is built on which JavaScript engine?

a)

V8 Engine

b)

SpiderMonkey

c)

Chakra

d)

Rhino

73.

Node.js is primarily used for developing ______ applications.

a)

Desktop

b)

Server-side

c)

Mobile

d)

Gaming

74.

Which command is used to check Node.js version?

a)

node version

b)

node --check

c)

node -v

d)

version node

75.

REPL stands for:

a)

Read–Execute–Print–Loop

b)

Read–Evaluate–Print–Loop

c)

Run–Execute–Process–Loop

d)

Read–Event–Process–L

76.

Which of the following is not an implicit object in jsp?

a)

exception

b)

date

c)

out

d)

context

77.

Default value of autoFlush attribute is?

a)

8kb

b)

16kb

c)

true

d)

false

78.

Which one is the correct order of phases in JSP life cycle?

a)

Initialization, Cleanup, Compilation, Execution

b)

Initialization, Compilation, Cleanup, Execution

c)

Compilation, Initialization, Execution, Cleanup

d)

Cleanup, Compilation, Initialization, Execution

79.

Which tag should be used to pass information from JSP to included JSP?

a)

Using <%jsp:page> tag

b)

Using <%jsp:param> tag

c)

Using <%jsp:import> tag

d)

Using <%jsp:useBean> tag

80.

Application is instance of which class?

a)

javax.servlet.Application

b)

javax.servlet.HttpContext

c)

javax.servlet.Context

d)

javax.servlet.ServletContext

81.

“request” is instance of which one of the following classes

a)

Request

b)

HttpRequest

c)

HttpServletRequest

d)

ServletRequest

82.

pageContext object is an instance of ____

a)

javax.servlet.jsp.PageContext

b)

javax.servlet.jsp.Page

c)

javax.servlet.jsp.Context

d)

java.servlet.jsp.PageContext

83.

<%

int id =99;

String desig = "Manager";

%>

Which of the given options best describes the above code.

a)

not a valid code

b)

id, desig variable are included in _jsp service() method

c)

id, desig variables are included in jspInit() method

d)

None

84.

Which of the following is not an action tag in jsp?

a)

<jsp:useBean>

b)

<jsp:param>

c)

<jsp:forward>

d)

<jsp:import>

85.

Servlet runs each request in a __________ ?

a)

OS shell

b)

JVM

c)

JRE

d)

Separate thread

86.

Which of the following statement is not correct about HTTP method ?

a)

A GET request append data to the end of the URL.

b)

A POST request append data to the end of the URL.

c)

HTTP DELETE method request for the Server to delete the resource

d)

HTTP OPTIONS request for communication options available on the request/response chain

87.

Which class provide implementation for service() method ?

a)

HttpServlet

b)

GenericServlet

c)

Servlet

d)

none of the above

88.

_________ is responsible for managing execution of servlet

a)

Web Container

b)

JVM

c)

Servlet Context

d)

Server

89.

The _______ specification defines an application programming interface for communication between the server and the application program

a)

Java Servlet

b)

java jdbc

c)

java applet

d)

java swing

90.

What is the lifecycle of a servlet?

a)

Servlet class is loaded

b)

Servlet instance is created

c)

init(),service() and destroy() methods will be called

d)

All the above

91.

How many times init() method is called during life time of a servlet?

a)

two times

b)

one time

c)

several times

d)

never called

92.

When destroy method() of servlet called ?

a)

for first request

b)

when you close the browser window

c)

when you remove the application from server

d)

none of the above

93.

where can you keep .java files in webapplication(Servlets)?

a)

root directory

b)

WEB-INF

c)

src

d)

classes

94.

web.xml is also called as --------------------

a)

data directory

b)

deployment descriptor

c)

directroy descriptor

d)

none of the above

95.

Where to place user defined webapplications in webserver (Apache Tomcat)

a)

in bin directory

b)

in lib directory

c)

webapps directory

d)

work directory

96.
which of these is not webserver
a)
Internet information server
b)
tomcat
c)
lightpd
d)
glassfish
97.
where we can put jar file
a)
classes
b)
library
c)
lib
d)
WEB-INF
98.
in which folder we can put web.xml
a)
classes
b)
package
c)
WEB-INF
d)
web apps
99.
which lifecycle method make ready the servlet for garbage collection
a)
init()
b)
service()
c)
destroy()
d)
put()
100.

Which of the following is true about HTTP Get method?

a)

A - The GET method sends the encoded user information appended to the page request.

b)

B - The GET method is the defualt method to pass information from browser to web server.

c)

C - Both of the above.

d)

D - None of the above.