unit 3 - Internet & Web Technologies
unit 3 - Internet & Web Technologies
HTML5
a) <marquee>
b) <center>
c) <section>
d) <font>
Answer: c) <section>
a) <nav>
b) <navigation>
c) <menu>
d) <nav>
Answer: a) <nav>
a) <main>
b) <body>
c) <content>
d) <main>
Answer: a) <main>
5. Which of the following is not a valid HTML5 element?
a) <header>
b) <article>
c) <footer>
d) <b>
Answer: d) <b>
a) <link>
b) <a href="http://www.example.com">Link</a>
c) <url>
d) <a href="http://www.example.com">Link</a>
a) <bottom>
b) <footer>
c) <end>
d) <foot>
Answer: b) <footer>
a) <head>
b) <header>
c) <top>
d) <heading>
Answer: b) <header>
a) <sound>
b) <audio>
c) <music>
d) <audio>
Answer: b) <audio>
a) <input>
b) <form>
c) <form>
d) <createform>
Answer: b) <form>
a) <movie>
b) <video>
c) <film>
d) <media>
Answer: b) <video>
a) text
b) email
c) password
d) url
Answer: b) email
a) <meta charset="UTF-8">
b) <meta encoding="UTF-8">
c) <charset="UTF-8">
d) <meta charset="UTF-8">
16. Which attribute in HTML5 is used to specify the source for the <video>
element?
a) src
b) src
c) source
d) href
Answer: a) src
a) <ul>
b) <nav>
c) <ol>
d) <list>
Answer: b) <nav>
18. In HTML5, what does the required attribute do for input elements?
Answer: b) Specifies that the field must be filled out before submitting the form
19. Which of the following is the correct HTML5 tag for defining a section in
a webpage?
a) <section>
b) <section>
c) <area>
d) <div>
Answer: a) <section>
a) <fieldset>
b) <group>
c) <options>
d) <choice>
Answer: a) <fieldset>
24. Which of the following tags is used for defining a table in HTML5?
a) <tbl>
b) <table>
c) <tbody>
d) <tr>
Answer: b) <table>
a) <thead>
b) <th>
c) <header>
d) <h1>
Answer: a) <thead>
a) fallback
b) source
c) alt
d) default
Answer: b) source
a) <meta data>
b) <meta>
c) <info>
d) <head>
Answer: b) <meta>
a) To highlight text
b) To define a heading
c) To create a hyperlink
d) To add a comment
a) <section>
b) <span>
c) <div>
d) <p>
Answer: b) <span>
30. What does the autoplay attribute do in the <video> element in HTML5?
Answer: b) Automatically starts playing the video when the page loads
a) <header>
b) <head>
c) <heading>
d) <title>
Answer: a) <header>
a) <map>
b) <iframe>
c) <googlemap>
d) <location>
Answer: b) <iframe>
a) <menu>
b) <navigation>
c) <nav>
d) <list>
Answer: c) <nav>
37. Which HTML5 element is used to define a section of content related to the
document?
a) <aside>
b) <article>
c) <section>
d) <section>
Answer: a) <aside>
38. What is the new form element introduced in HTML5 for handling date
input?
a) <input type="date">
b) <input type="date">
c) <input type="datetime">
d) <input type="calendar">
40. Which attribute is used to specify the alternative text for an image in
HTML5?
a) alt
b) src
c) title
d) longdesc
Answer: a) alt
Answer: b) <select>
a) <scroll>
b) <div>
c) <section>
d) <content>
Answer: b) <div>
44. Which of the following can be used to store data on the client-side in
HTML5?
a) localStorage
b) cookies
c) sessionStorage
d) databases
Answer: a) localStorage
a) font-face
b) font-family
c) @font-face
d) font-link
Answer: c) @font-face
46. How do you create an input field for entering a password in HTML5?
a) <input type="text">
b) <input type="password">
c) <input type="password">
d) <input type="secret">
a) <article>
b) <header>
c) <footer>
d) <section>
Answer: a) <article>
48. Which of the following is used to define a navigation link within a webpage
in HTML5?
a) <a>
b) <link>
c) <button>
d) <nav>
Answer: a) <a>
Answer: b) <caption>
CSS3
1. Which of the following is the correct syntax to change the background color
in CSS3?
a) background-color: #FFFFFF;
b) background-color: white;
c) background: color white;
d) color: background white;
a) .selector
b) #selector
c) .selector, #selector
d) *selector
Answer: b) #selector
a) font-family
b) font-size
c) font-weight
d) text-align
Answer: a) font-family
a) background-image
b) background-color
c) image-background
d) background-picture
Answer: a) background-image
a) transition: 1s;
b) transition: all 0.5s ease;
c) transition-effect: all 1s;
d) transition-duration: 0.5s;
a) height
b) max-height
c) min-height
d) vertical-align
Answer: a) height
10. Which CSS3 property is used to define the space between lines of text?
a) letter-spacing
b) line-height
c) word-spacing
d) text-spacing
Answer: b) line-height
12. Which of the following is used to specify the width of an element in CSS3?
a) width-size
b) width
c) element-width
d) element-size
Answer: b) width
a) opacity-level
b) opacity
c) transparency
d) visibility
Answer: b) opacity
14. Which property is used to set the space between the content and the
border of an element in CSS3?
a) padding
b) margin
c) border-spacing
d) border-width
Answer: a) padding
15. Which of the following CSS3 properties is used to set the display behavior
of an element?
a) display-mode
b) display
c) block-display
d) style-display
Answer: b) display
a) font-color
b) color
c) text-color
d) background-color
Answer: b) color
a) font-size: large;
b) font-size: 16px;
c) font-style: large;
d) text-size: 16px;
a) bg-color
b) background-color
c) color-background
d) background
Answer: b) background-color
a) gradient
b) background-image: linear-gradient();
c) background-color: gradient();
d) background: gradient();
a) padding
b) margin
c) spacing
d) gap
Answer: b) margin
22. Which of the following is a new CSS3 layout feature for creating flexible
layouts?
a) flexbox
b) grid
c) positioning
d) table-layout
Answer: a) flexbox
23. How do you create an animated transition effect for a property change in
CSS3?
a) text-align: center;
b) text-align: center;
c) vertical-align: center;
d) align: center;
a) line-height
b) line-spacing
c) height-spacing
d) spacing
Answer: a) line-height
a) box-shadow
b) text-shadow
c) shadow
d) element-shadow
Answer: a) box-shadow
27. Which of the following is a new unit of measurement in CSS3?
a) rem
b) em
c) pt
d) px
Answer: a) rem
28. Which of the following CSS3 properties is used to control the layout of
items inside a container?
a) flex
b) align-items
c) justify-content
d) float
Answer: a) flex
a) @media queries
b) flexbox
c) grid
d) border-radius
a) transparency
b) opacity
c) visibility
d) clear
Answer: b) opacity
33. Which of the following is the correct syntax for a CSS3 class selector?
a) #classname
b) .classname
c) classname
d) classname#
Answer: b) .classname
34. Which CSS3 property allows you to set the border style of an element?
a) border-size
b) border-style
c) border-color
d) border-width
Answer: b) border-style
a) font-style: bold;
b) font-weight: bold;
c) font: bold;
d) font-size: bold;
37. Which CSS3 property allows you to add a curved border to an element?
a) border-radius
b) corner-radius
c) radius
d) border-corner
Answer: a) border-radius
38. Which CSS3 property is used to set the background size of an image?
a) background-size
b) image-size
c) background-image-size
d) image-background
Answer: a) background-size
a) rotate()
b) transform
c) transform3D()
d) rotate3D()
Answer: b) transform
a) hover: element;
b) element:hover {}
c) hover {element}
d) element:hover {}
Answer: b) element:hover {}
a) text-align
b) align-text
c) align
d) text-position
Answer: a) text-align
Answer: b) It defines how the width and height of elements are calculated
45. Which of the following CSS3 properties is used to specify the width of a
border?
a) border-size
b) border-width
c) border-thickness
d) border-height
Answer: b) border-width
a) @animation
b) @keyframes
c) @frames
d) @animation-key
Answer: b) @keyframes
a) display
b) visibility
c) opacity
d) visibility-mode
Answer: b) visibility
a) grid
b) flex
c) layout
d) layout-grid
Answer: a) grid
JAVASCRIPT
a) console.print("Hello, world!");
b) console.log("Hello, world!");
c) log.console("Hello, world!");
d) echo.console("Hello, world!");
a) var x = 10;
b) let x = 10;
c) const x = 10;
d) All of the above
a) append()
b) push()
c) push()
d) add()
Answer: b) push()
4. What is the correct way to define a function in JavaScript?
a) function myFunction() {}
b) function myFunction() {}
c) function: myFunction() {}
d) myFunction() function {}
a) document.getElementById()
b) document.getElementByClass()
c) document.querySelector()
d) document.getElementByClassName()
Answer: a) document.getElementById()
a) number
b) number
c) undefined
d) NaN
Answer: b) number
a) /* This is a comment */
b) // This is a comment
c) // This is a comment
d) <!-- This is a comment -->
a) if (x = 10)
b) if (x == 10)
c) if x == 10
d) if (x = 10);
Answer: b) if (x == 10)
a) 1
b) 0
c) true
d) []
Answer: b) 0
11. Which of the following operators is used to compare both value and type
in JavaScript?
a) ==
b) ===
c) !=
d) =
Answer: b) ===
12. Which of the following methods is used to remove the last element from an
array in JavaScript?
a) pop()
b) delete()
c) shift()
d) splice()
Answer: a) pop()
14. Which of the following methods is used to remove the first element from
an array in JavaScript?
a) pop()
b) shift()
c) unshift()
d) splice()
Answer: b) shift()
a) 2
b) 11
c) NaN
d) undefined
Answer: b) 11
Answer: b) functionName()
a) constant x = 10;
b) const x = 10;
c) var const x = 10;
d) let const x = 10;
a) length(array)
b) array.length
c) array.size()
d) length of array
Answer: b) array.length
20. Which of the following will declare a function that returns a value in
JavaScript?
a) 11
b) 101
c) 10
d) NaN
Answer: b) 101
a) arr.sort()
b) arr.sort()
c) arr.order()
d) arr.arrange()
Answer: b) arr.sort()
a) class MyClass {}
b) class MyClass {}
c) MyClass = class {}
d) function MyClass() {}
a) Array.isArray()
b) Array.isArray()
c) isArray()
d) checkArray()
Answer: b) Array.isArray()
a) Not a Number
b) Null and Not
c) No actual number
d) Non-arithmetic Number
a) callbacks
b) Promises
c) async/await
d) All of the above
a) ==
b) =
c) ===
d) =>
Answer: b) =
a) event.stop()
b) event.stopPropagation()
c) event.preventDefault()
d) event.cancel()
Answer: b) event.stopPropagation()
a) true
b) false
c) undefined
d) NaN
Answer: a) true
a) null
b) object
c) undefined
d) NaN
Answer: b) object
a) JSON.parse()
b) JSON.stringify()
c) JSON.decode()
d) JSON.convert()
Answer: a) JSON.parse()
40. How can you detect the operating system in JavaScript?
a) navigator.os
b) navigator.getOS()
c) navigator.platform
d) navigator.system()
Answer: c) navigator.platform
a) setTimeout()
b) setInterval()
c) timeOut()
d) delay()
Answer: a) setTimeout()
a) element.dispatchEvent()
b) element.trigger()
c) element.fire()
d) element.emit()
Answer: a) element.dispatchEvent()
a) A random integer
b) A random floating-point number between 0 and 1
c) A random number between -1 and 1
d) A random value between 1 and 100
a) An undefined value
b) An intentional absence of any object value
c) A type of object
d) An invalid reference
48. Which method is used to remove all the elements from an array in
JavaScript?
a) array.splice(0, array.length)
b) array.clear()
c) array.delete()
d) array.removeAll()
a) array.includes()
b) array.contains()
c) array.has()
d) array.search()
Answer: a) array.includes()
50. Which of the following is the correct way to add a comment in JavaScript?
a) /* This is a comment */
b) // This is a comment
c) <!-- This is a comment -->
d) # This is a comment
JSON
a) Structured data
b) Text data
c) Unstructured data
d) Binary data
a) JSON.parse()
b) JSON.stringify()
c) parseJSON()
d) convertJSON()
Answer: a) JSON.parse()
a) JSON.parse()
b) JSON.stringify()
c) toJSON()
d) convertJSON()
Answer: b) JSON.stringify()
8. What is the correct syntax to define an array in JSON?
a) "null"
b) null
c) null
d) "None"
Answer: c) null
a) ;
b) :
c) ,
d) =
Answer: b) :
a) {"number": 100}
b) {"number": "100"}
c) {"number": 100.0}
d) {"number": "100.0"}
a) Object
b) String
c) Date
d) Function
Answer: d) Function
Answer: c) true
18. What is the correct way to include a JSON object inside an array?
20. How would you check if a string is a valid JSON string in JavaScript?
23. Which JSON function is used to convert a JSON string into a JavaScript
object?
a) JSON.stringify()
b) JSON.parse()
c) JSON.convert()
d) JSON.objectify()
Answer: b) JSON.parse()
a) A string
b) A function
c) A number
d) A boolean
Answer: b) A function
a) {"isActive": yes}
b) {"isActive": true}
c) {"isActive": "true"}
d) {"isActive": 1}
27. What will the following code output? JSON.parse('{"name": "John", "age":
30}')
28. How do you store multiple JSON objects in a single JSON file?
30. What is the method used to check if a value is a valid JSON string?
a) JSON.validate()
b) try...catch with JSON.parse()
c) JSON.isValid()
d) JSON.check()
a) {"key": "value"}
b) "key: value"
c) "key" = "value"
d) key => value
a) A JavaScript object
b) A JSON string
c) An array
d) A number
36. How would you include a JSON object inside another JSON object?
a) {"name": "Alice"}
b) {"age": 25}
c) {"age": (25)}
d) {"isEmployed": true}
a) undefined
b) null
c) Throws an error
d) An empty object
a) "value"
b) "value" (double quotes)
c) 'value' (single quotes)
d) value without quotes
41. How can you store a JSON object in the browser's local storage?
a) localStorage.addItem("data", JSON.stringify(object))
b) localStorage.setItem("data", JSON.stringify(object))
c) localStorage.store("data", object)
d) localStorage.putItem("data", object)
a) [1, 2, 3, 4]
b) {1, 2, 3, 4}
c) ["1", "2", "3", "4"]
d) ("1", "2", "3", "4")
Answer: a) [1, 2, 3, 4]
a) Strings as keys
b) Numbers as values
c) Functions as values
d) Booleans as values
46. How do you convert a JSON object back into a JavaScript object?
a) Use JSON.parse()
b) Use JSON.stringify()
c) Use JSON.objectify()
d) Use JSON.toObject()
48. Which of the following is a valid JSON object with an array value?
AJAX
a) XMLHttpRequest
b) HttpRequest
c) FetchRequest
d) ServerRequest
Answer: a) XMLHttpRequest
a) sendRequest()
b) send()
c) post()
d) request()
Answer: b) send()
a) Only XML
b) XML, JSON, HTML, and plain text
c) Only HTML
d) Only JSON
a) GET
b) POST
c) PUT
d) DELETE
Answer: a) GET
8. Which of the following events is fired when an AJAX request completes?
a) onload
b) onreadystatechange
c) oncomplete
d) onfinish
Answer: b) onreadystatechange
10. What is the value of readyState when the request has been successfully
completed?
a) 0
b) 1
c) 4
d) 5
Answer: c) 4
11. Which method can be used to retrieve the status of an AJAX request?
a) statusCode()
b) getStatus()
c) status
d) responseStatus()
Answer: c) status
13. How can you send data to the server with an AJAX request?
a) Using queryString()
b) Using send() method with parameters
c) Using request()
d) Using sendToServer()
14. How does the XMLHttpRequest object communicate with the server?
a) By using TCP/IP
b) By using HTTP or HTTPS protocol
c) By using FTP
d) By using WebSockets
15. Which of the following methods is used to send a GET request in AJAX?
a) send()
b) open()
c) request()
d) get()
Answer: b) open()
18. Which of the following is true about the GET method in AJAX?
a) onerror
b) onreadystatechange with error handling
c) catchError()
d) handleError()
20. Which HTTP method is generally used for submitting data with AJAX
requests?
a) GET
b) POST
c) PUT
d) DELETE
Answer: b) POST
a) POST request
b) PUT request
c) GET request
d) DELETE request
a) application/x-www-form-urlencoded
b) text/plain
c) application/json
d) text/html
Answer: a) application/x-www-form-urlencoded
24. How do you send JSON data to the server using AJAX?
25. Which of the following is used to monitor the status of an AJAX request?
a) readyState
b) statusCode
c) requestStatus
d) responseStatus
Answer: a) readyState
28. Which of the following methods in JavaScript can be used to make AJAX
requests?
a) HttpRequest()
b) XMLHttpRequest()
c) fetch()
d) Both b and c
a) jQuery
b) Axios
c) React
d) Vue.js
Answer: a) jQuery
31. Which of the following events can be used to execute code after an AJAX
request has completed successfully?
a) onload
b) onchange
c) onabort
d) onerror
Answer: a) onload
32. What is the main advantage of AJAX over traditional HTML form
submissions?
33. How do you specify the method type (GET, POST, etc.) in an AJAX
request?
Answer: a) By allowing parts of the page to update dynamically without a full reload
36. What is the typical role of AJAX in Single Page Applications (SPA)?
a) Use XMLHttpRequest.parallel()
b) Use Promise.all() or multiple XMLHttpRequest instances
c) Use async functions only
d) Use await for each request
a) try...catch block
b) errorHandler()
c) onexception()
d) catchError()
a) Set the method type to PUT using the open() method and use send()
b) Use request() with the PUT method
c) Use open() method with PUT as a parameter and post() method
d) Use PUT() method
Answer: a) Set the method type to PUT using the open() method and use send()
a) To asynchronously send and receive data between the client and server
b) To manage API authentication
c) To encrypt data before sending it
d) To cache API responses
Answer: a) To asynchronously send and receive data between the client and server
47. Which of the following can be used to handle the success of an AJAX
request in jQuery?
a) success() method
b) onSuccess() method
c) complete() method
d) responseSuccess()
XML
a) <xml>
b) <book>
c) <1book>
d) <title>
Answer: c) <1book>
14. What is the maximum number of attributes an element can have in XML?
a) 1
b) 10
c) Unlimited
d) 100
Answer: c) Unlimited
15. Which of the following is the correct syntax for self-closing an XML tag?
a) <book/>
b) <book/>
c) <book></book>
d) <book><book/>
Answer: b) <book/>
a) 1book
b) book1
c) #book
d) book-1
Answer: b) book1
17. Which of the following characters is not allowed in XML element names?
a) Letter
b) Number
c) Space
d) Hyphen
Answer: c) Space
a) As a URL
b) As plain text
c) As binary data
d) As a form submission
19. Which of the following is the correct way to represent data in XML
format?
a) <data value="10">
b) <value>10</value>
c) <value>10</value>
d) <data>10</data>
Answer: c) <value>10</value>
a) <book>
b) <book>
c) <title>
d) <p>
Answer: b) <book>
a) XML is used to define the structure of a document, while HTML is used for
presentation
b) XML focuses on data storage, while HTML focuses on document structure
c) XML is used to style documents, while HTML is used for structure
d) There is no difference
Answer: a) XML is used to define the structure of a document, while HTML is used for
presentation
a) <1book>
b) book><title>
c) <book><title>XML for Beginners</title></book>
d) <book><title>XML for Beginners</book>
a) By using attributes
b) By enclosing the data within opening and closing tags
c) By encoding the data into hexadecimal
d) By using a comment
a) <book></book>
b) <book/><book>
c) <book></book>
d) book><book>
Answer: a) <book></book>
34. How can you format XML data for human readability?
a) Using CSS
b) By adding proper indentation and line breaks
c) By adding comments
d) By using XML parsers
a) <
b) <
c) &xml;
d) &xmlsymbol;
Answer: b) <
a) /* This is a comment */
b) <!-- This is a comment -->
c) -- This is a comment --
d) <comment>This is a comment</comment>
Answer: a) To define the legal structure and rules for an XML document
44. Which of the following is used to extract data from an XML document in
JavaScript?
a) getElementById()
b) getElementsByTagName()
c) getElementsByTagName()
d) getAttribute()
Answer: b) getElementsByTagName()
45. How do you define an attribute in XML?
a) ASCII
b) UTF-8
c) ISO-8859-1
d) UTF-16
Answer: b) UTF-8
50. Which of the following is true about XML and its content?
WEB SERVERS
a) MySQL
b) Apache HTTP Server
c) PHP
d) MongoDB
a) GET
b) POST
c) PUT
d) DELETE
Answer: a) GET
4. What does the acronym "HTTP" stand for?
a) 25
b) 80
c) 443
d) 21
Answer: b) 80
a) FTP
b) SSL/TLS
c) HTTP
d) SSH
Answer: b) SSL/TLS
11. What is the main advantage of using a web server like Nginx over Apache?
Answer: a) .html
a) Nginx
b) Microsoft IIS
c) Apache HTTP Server
d) Lighttpd
Answer: b) The folder where the server's web files are stored
a) 21
b) 443
c) 80
d) 8080
Answer: b) 443
17. Which web server feature allows the distribution of traffic to multiple
servers?
Answer: b) Nginx
21. What does the term "Virtual Hosting" mean in web servers?
23. What is the main advantage of using a CDN (Content Delivery Network)
with a web server?
24. What is a "web application firewall" used for in relation to web servers?
25. What kind of web server is used for serving dynamic web content?
a) FTP Server
b) Application Server
c) DNS Server
d) Cache Server
a) High cost
b) Limited server resources
c) Easy to scale
d) Complete control over the server
30. What is the role of a web server in the HTTP request-response cycle?
31. Which of the following is true about the difference between a web server
and a database server?
a) A web server serves web pages, while a database server manages databases
b) A web server stores data, while a database server serves web pages
c) A web server and a database server perform the same functions
d) A web server handles HTTP requests, and a database server handles HTTPS
requests
Answer: a) A web server serves web pages, while a database server manages databases
a) 500
b) 200
c) 404
d) 301
Answer: b) 200
a) Server error
b) Page not found
c) Unauthorized access
d) Forbidden access
35. Which web server is preferred for static websites due to its efficiency?
a) Nginx
b) Microsoft IIS
c) Apache HTTP Server
d) Tomcat
Answer: a) Nginx
36. Which of the following web servers is designed to handle high traffic
websites?
a) Microsoft IIS
b) Nginx
c) Apache HTTP Server
d) WAMP
Answer: b) Nginx
37. What is the "load balancer" feature in web servers used for?
39. Which web server can be used for Java-based web applications?
a) Microsoft IIS
b) Apache Tomcat
c) Nginx
d) LiteSpeed
a) Application servers
b) DNS servers
c) Web servers
d) Proxy servers
45. What is the default behavior of a web server when it encounters a 500
error?
a) Redirects to another page
b) Returns an internal server error
c) Returns a page not found error
d) Redirects to a maintenance page
48. What is the typical method for securing a web server against malicious
attacks?
50. What is the primary purpose of a DNS server in relation to web servers?
a) Cross-platform compatibility
b) Multithreading support
c) Rich graphical interfaces
d) Limited scalability
a) Hibernate
b) Spring
c) JavaFX
d) Swing
Answer: b) Spring
a) Socket
b) ServerSocket
c) HttpServlet
d) HttpURLConnection
Answer: b) ServerSocket
a) Servlets
b) JavaFX
c) JSP
d) EJB (Enterprise JavaBeans)
Answer: b) JavaFX
a) JSP
b) RMI (Remote Method Invocation)
c) JDBC
d) JSP
10. Which Java framework simplifies web application development with MVC
(Model-View-Controller) architecture?
a) Spring MVC
b) EJB
c) JavaFX
d) Hibernate
a) web.xml
b) .java
c) JSP
d) .class
Answer: a) web.xml
13. What is the main advantage of using EJB (Enterprise JavaBeans)?
14. Which of the following methods are part of the Servlet interface?
a) Connection
b) Statement
c) Driver
d) ResultSet
Answer: a) Connection
a) @Autowired
b) @Inject
c) @Bean
d) @Entity
Answer: a) @Autowired
a) Singleton
b) Prototype
c) Request
d) Session
Answer: a) Singleton
18. Which of the following protocols is primarily used in Java for server-side
communication?
a) FTP
b) HTTP
c) SMTP
d) Telnet
Answer: b) HTTP
20. Which Java class is used to read input from the user in a server-side
application?
a) BufferedReader
b) PrintWriter
c) Scanner
d) StringReader
Answer: a) BufferedReader
a) application.properties
b) spring.xml
c) config.yml
d) app.js
Answer: a) application.properties
22. What is the primary role of the doPost() method in a servlet?
a) Hibernate
b) Spring
c) JSP
d) Struts
Answer: a) Hibernate
a) .java
b) .class
c) .jsp
d) .html
Answer: a) .java
27. Which of the following is a method in the java.sql.Statement class used for
executing SQL queries?
a) executeQuery()
b) executeUpdate()
c) execute()
d) All of the above
a) JavaFX
b) JAX-RS (Java API for RESTful Web Services)
c) JavaMail
d) JUnit
a) commit()
b) commitTransaction()
c) beginTransaction()
d) executeUpdate()
Answer: a) commit()
36. Which of the following is the default method for sending HTTP requests in
Java?
a) HttpURLConnection
b) ServerSocket
c) HttpRequest
d) HttpResponse
Answer: a) HttpURLConnection
37. Which Java class is used for reading data from a file in a server-side
application?
a) BufferedWriter
b) BufferedReader
c) FileWriter
d) FileReader
Answer: b) BufferedReader
43. Which of the following Java classes is used for session management in a
web application?
a) HttpSession
b) SessionManager
c) ServerSession
d) UserSession
Answer: a) HttpSession
45. Which of the following best describes Java's role in web applications?
49. What is the main feature of a Java application server like Apache
Tomcat?
a) It runs Java-based web applications
b) It compiles Java code
c) It stores session data
d) It handles security measures
50. Which of the following is a commonly used container for Java web
applications?
a) Servlet Container
b) Application Server
c) WebSocket
d) JUnit
PHP
a) Hypertext Preprocessor
b) Personal Home Page
c) Preprocessor Hypertext Page
d) Programable Hypertext Processor
a) var $name;
b) variable name;
c) $name;
d) variable $name;
Answer: c) $name;
a) sendHeader()
b) header()
c) send()
d) httpHeader()
Answer: b) header()
a) file_exists()
b) is_file()
c) check_file()
d) is_readable()
Answer: a) file_exists()
a) $_GET[]
b) $_GET['variable_name']
c) $_POST[]
d) $_POST['variable_name']
Answer: b) $_GET['variable_name']
a) strlen()
b) strlen()
c) string_length()
d) count()
Answer: a) strlen()
a) session_start()
b) start_session()
c) session_begin()
d) session_open()
Answer: a) session_start()
11. Which of the following is a correct way to include an external PHP file?
a) include_file('file.php')
b) require('file.php')
c) include('file.php')
d) import('file.php')
Answer: c) include('file.php')
14. How can you retrieve the current date and time in PHP?
a) date('Y-m-d H:i:s')
b) current_date()
c) now()
d) get_current_time()
16. Which PHP function is used to find the position of the first occurrence of a
substring in a string?
a) strpos()
b) indexOf()
c) find()
d) substringIndex()
Answer: a) strpos()
a) cookie_get()
b) $_COOKIE['cookie_name']
c) get_cookie()
d) cookie_value()
Answer: b) $_COOKIE['cookie_name']
a) redirect()
b) header('Location: page.php');
c) header('Location: page.php');
d) goTo('page.php');
Answer: b) Contains information about the server environment and client requests
a) object
b) array
c) boolean
d) string
Answer: a) object
22. Which function is used to get the current session ID in PHP?
a) session_id()
b) get_session()
c) current_session()
d) session_token()
Answer: a) session_id()
a) session_destroy()
b) destroy_session()
c) clear_session()
d) session_end()
Answer: a) session_destroy()
a) fread()
b) read_file()
c) file_read()
d) get_file()
Answer: a) fread()
26. Which of the following PHP functions is used to start a file upload?
a) upload_file()
b) start_upload()
c) move_uploaded_file()
d) upload_start()
Answer: c) move_uploaded_file()
a) sort_array()
b) sort()
c) array_sort()
d) order_array()
Answer: b) sort()
a) include_before('file.php');
b) include_first('file.php');
c) include('file.php');
d) import('file.php');
Answer: c) include('file.php');
Answer: b) Fetches a row from a result set and returns it as an associative array
30. Which of the following is used to define the action when a form is
submitted in PHP?
a) form_action="submit.php"
b) action="submit.php"
c) submit_action="submit.php"
d) action="post.php"
Answer: b) action="submit.php"
(Continued in next response)
4o mini
You said:
YES
ChatGPT said:
ChatGPT
a) time()
b) time()
c) current_time()
d) get_timestamp()
Answer: b) time()
32. Which PHP function is used to remove white spaces from both ends of a
string?
a) strip_tags()
b) trim()
c) clean()
d) sanitize()
Answer: b) trim()
a) /* This is a comment */
b) /* This is a comment */
c) // This is a comment
d) <!-- This is a comment -->
Answer: b) unset()
35. How can you prevent a PHP file from being accessed directly?
a) count_elements()
b) count()
c) array_count()
d) length()
Answer: b) count()
a) currency_format()
b) number_format()
c) format_currency()
d) to_currency()
Answer: b) number_format()
a) mail()
b) mail()`
c) email()
d) send_mail()
Answer: a) mail()
39. How can you prevent a user from submitting a form multiple times in
PHP?
a) By using cookies
b) By using a session variable to track form submission
c) By using an HTML disabled attribute
d) By using a reload() method
40. Which of the following PHP functions is used to escape special characters
in a string for use in an SQL query?
a) mysql_real_escape_string()
b) sql_escape()
c) escape()
d) string_escape()
Answer: a) mysql_real_escape_string()
a) upload_file()
b) move_uploaded_file()
c) send_file()
d) file_upload()
Answer: b) move_uploaded_file()
a) function myFunction() {}
b) function myFunction() {}
c) declare function myFunction() {}
d) func myFunction() {}
44. Which of the following is the correct way to define an associative array in
PHP?
a) mysqli_close()
b) db_close()
c) close_connection()
d) mysql_disconnect()
Answer: a) mysqli_close()
a) include("file.php");
b) include("file.php");
c) require("file.php");
d) import("file.php");
Answer: a) include("file.php");
47. Which of the following is the correct way to start a session in PHP?
a) session_start();
b) session_start();
c) start_session();
d) begin_session();
Answer: b) session_start();
48. How do you display an error message in PHP?
a) error_display('Message');
b) echo 'Message';
c) print_error('Message');
d) show_error('Message');
a) MySQLi
b) DBConnection
c) MySQL
d) PDO
Answer: a) MySQLi
50. Which of the following PHP functions is used to redirect the user to
another page?
a) go_to()
b) change_location()
c) header("Location: new_page.php");
d) redirect_page("new_page.php");
PYTHON
a) .pyt
b) .py
c) .python
d) .pyp
Answer: b) .py
2. What is the correct syntax to output "Hello, World" in Python?
a) echo("Hello, World")
b) print("Hello, World")
c) output("Hello, World")
d) println("Hello, World")
a) List
b) Dictionary
c) Tuple
d) Set
Answer: c) Tuple
a) list = (1, 2, 3)
b) list = [1, 2, 3]
c) list = {1, 2, 3}
d) list = <1, 2, 3>
a) append()
b) append()
c) insert()
d) add()
Answer: b) append()
a) function()
b) def
c) func
d) method()
Answer: b) def
a) abcabcabc
b) abcabcabc
c) 3abc
d) Error
Answer: b) abcabcabc
a) 25
b) 17
c) 17
d) 35
Answer: b) 17
a) _var
b) var_1
c) 1var
d) 1var
Answer: c) 1var
a) <class 'int'>
b) <class 'float'>
c) <class 'double'>
d) <class 'integer'>
a) type(variable)
b) type(variable)
c) checktype(variable)
d) variable.type()
Answer: b) type(variable)
a) int("string")
b) int("string")
c) str("string")
d) integer("string")
Answer: b) int("string")
a) False
b) True
c) 0
d) None
Answer: b) True
16. Which of the following is the correct syntax for a while loop in Python?
a) class MyClass:
b) class MyClass:
c) MyClass class:
d) define class MyClass:
a) list.sort()
b) list.sort()`
c) sort(list)
d) list.sorted()
Answer: b) list.sort()
a) try...catch
b) try...except
c) try...finally
d) catch...finally
Answer: b) try...except
a) True
b) False
c) Error
d) None
Answer: b) False
22. Which of the following is used to read input from the user in Python?
a) input()
b) input()
c) scan()
d) read()
Answer: b) input()
a) 2
b) 2.5
c) 2.0
d) Error
Answer: b) 2.5
a) end
b) return
c) stop
d) exit
Answer: b) return
a) set = []
b) set = {1, 2, 3}
c) set = ()
d) set = [1, 2, 3]
a) concat("hello", "world")
b) "hello" + "world"
c) concat("hello" + "world")
d) "hello" . "world"
27. Which of the following is the correct syntax for importing a module in
Python?
a) import module_name
b) import(module_name)
c) import from module_name
d) include module_name
a) 1
b) 1
c) 0
d) 3
Answer: b) 1
a) python3 -m venv
b) python3 -m venv myenv
c) python -m venv
d) python venv
a) tuple = ()
b) tuple = {}
c) tuple = []
d) tuple = [None]
Answer: a) tuple = ()
a) key in dict
b) key in dict
c) dict.key()
d) dict.contains(key)
32. Which of the following Python libraries is used for data analysis?
a) NumPy
b) Pandas
c) SciPy
d) TensorFlow
Answer: b) Pandas
33. Which of the following is the correct way to declare a comment in Python?
a) // Comment
b) /* Comment */
c) # Comment
d) <!-- Comment -->
Answer: c) # Comment
a) [1, 3, 4]
b) [1, 3, 4]
c) [2, 3, 4]
d) [1, 2, 3]
Answer: b) [1, 3, 4]
a) list
b) vector
c) tuple
d) dict
Answer: b) vector
a) install
b) pip install package_name
c) python install package_name
d) setup.py install
a) class MyClass:
b) class MyClass:
c) define MyClass:
d) create class MyClass:
a) import random
b) import rand
c) import math
d) import numbers
Answer: a) import random
39. Which of the following is the method to get the length of a string in
Python?
a) len()
b) len()`
c) str.length()
d) string_length()
Answer: b) len()
a) try...except
b) try...except
c) try...catch
d) catch...finally
Answer: b) try...except
a) CONST = 10
b) CONST = 10
c) const CONST = 10
d) define CONST 10
Answer: b) CONST = 10
a) combine()
b) extend()
c) concat()
d) add()
Answer: b) extend()
Answer: b) ()
a) True
b) True
c) False
d) None
Answer: b) True
45. Which of the following is the correct way to open a file in Python?
a) open("file.txt", "r")
b) open("file.txt", "r")
c) open("file.txt", "read")
d) open("file.txt")
a) chmod +x script.py
b) chmod +x script.py
c) chmod +r script.py
d) chmod 777 script.py
a) [0, 1, 2]
b) [0, 1, 2]
c) [1, 2, 3]
d) Error
Answer: b) [0, 1, 2]
48. How do you remove an item from a list by value in Python?
a) remove()
b) remove()`
c) delete()
d) pop()
Answer: b) remove()
a) set = {}
b) set = set()`
c) set = []
d) set = ()
a) dict = {}
b) dict = {}`
c) dict = []
d) dict = ()
WEBDESIGN TOOLS
1. Which of the following is a popular web design tool used for creating
layouts?
a) Adobe Dreamweaver
b) Microsoft Word
c) Paint
d) Notepad
3. Which web design tool is known for its vector graphics capabilities and is
often used for designing logos?
a) Adobe Illustrator
b) Microsoft Word
c) Adobe Photoshop
d) Notepad++
5. Which of the following tools is specifically used for responsive web design?
a) Bootstrap
b) Visual Studio
c) Adobe XD
d) GIMP
Answer: a) Bootstrap
a) Adobe XD
b) Visual Studio Code
c) Notepad++
d) Microsoft Excel
Answer: a) Adobe XD
8. Which of the following is a free, open-source web design tool for creating
web pages?
a) Microsoft FrontPage
b) WordPress
c) Adobe Dreamweaver
d) Microsoft Paint
Answer: b) WordPress
9. Which software is mainly used for web design and also for web
development through integration with HTML, CSS, and JavaScript?
a) Adobe Dreamweaver
b) Notepad++
c) Adobe Illustrator
d) GIMP
12. What does the web design tool "GIMP" stand for?
14. Which of the following web design tools is most associated with
wireframing?
a) Microsoft Excel
b) Balsamiq
c) Photoshop
d) Dreamweaver
Answer: b) Balsamiq
15. What is the main purpose of the tool InVision in web design?
16. Which of the following is a key feature of the web design tool Webflow?
17. Which tool is best known for its responsive web design framework?
a) Bootstrap
b) WordPress
c) Figma
d) Dreamweaver
Answer: a) Bootstrap
18. What is the function of a tool like Notepad++ for web design?
a) Image creation
b) Text and code editing
c) Website publishing
d) Video editing
19. Which web design tool is known for its powerful animation and interactive
design capabilities?
a) Adobe Animate
b) Figma
c) WordPress
d) GIMP
a) Figma
b) Adobe Illustrator
c) Notepad++
d) Adobe Premiere Pro
Answer: a) Figma
21. What is the primary function of the tool Sublime Text in web design?
a) Code editing
b) Image manipulation
c) Website hosting
d) Database design
22. Which tool allows you to easily create forms, buttons, and layouts with
drag-and-drop features for web design?
a) Webflow
b) Dreamweaver
c) Sublime Text
d) Sketch
Answer: a) Webflow
23. Which web design tool helps in creating and managing CSS stylesheets
visually?
a) Adobe Dreamweaver
b) Microsoft Word
c) Notepad++
d) GIMP
25. Which tool can be used to export a high-fidelity design prototype into
code?
a) Webflow
b) GIMP
c) Figma
d) Adobe Photoshop
Answer: a) Webflow
27. Which web design tool is used to test and debug websites?
a) Sublime Text
b) Google Chrome Developer Tools
c) Dreamweaver
d) Adobe Illustrator
a) GIMP
b) Adobe Photoshop
c) Adobe Illustrator
d) Sketch
Answer: a) GIMP
30. Which web design tool is used for creating dynamic content such as
animations and interactive graphics?
a) Adobe Animate
b) WordPress
c) Dreamweaver
d) Sublime Text
31. What is the primary advantage of using WordPress as a web design tool?
32. Which tool is used for designing mobile-friendly websites with responsive
design features?
a) Dreamweaver
b) Bootstrap
c) Notepad++
d) Microsoft Word
Answer: b) Bootstrap
33. Which tool is used to create web design prototypes for testing and
feedback?
a) InVision
b) GIMP
c) Adobe Illustrator
d) Notepad++
Answer: a) InVision
35. Which tool is used for the design of modern websites and web applications
using CSS, HTML, and JavaScript?
a) Webflow
b) GIMP
c) Adobe Illustrator
d) Microsoft Paint
Answer: a) Webflow
36. Which tool is specifically for building and testing APIs in web
development?
a) Sublime Text
b) Postman
c) Figma
d) Sketch
Answer: b) Postman
37. Which web design tool offers features for real-time collaboration on
designs?
a) Adobe Photoshop
b) Figma
c) Notepad++
d) Sublime Text
Answer: b) Figma
38. What is the main feature of Wix as a web design tool?
39. Which of the following tools is best suited for web and app prototyping?
a) Axure RP
b) GIMP
c) Adobe Premiere Pro
d) Sublime Text
Answer: a) Axure RP
40. Which software is used for detailed design of website elements like buttons
and icons?
a) Adobe Illustrator
b) Sublime Text
c) WordPress
d) Notepad++
43. Which of the following tools is used to create and manage databases for
web applications?
a) Sublime Text
b) phpMyAdmin
c) Adobe XD
d) Figma
Answer: b) phpMyAdmin
45. Which tool is primarily used for designing and testing dynamic content on
websites?
a) Adobe Animate
b) Microsoft Excel
c) Sketch
d) WordPress
46. What is the primary use of the tool Sketch in web design?
a) Adobe Illustrator
b) GIMP
c) Figma
d) WordPress
48. What is the main advantage of using Figma for web design?
49. Which tool is best for building interactive wireframes and prototypes?
a) Axure RP
b) Adobe XD
c) Sketch
d) GIMP
Answer: a) Axure RP
1. Which of the following is a popular mail client for both personal and
business use?
a) Microsoft Outlook
b) Adobe Photoshop
c) Notepad++
d) GIMP
a) Mail client
b) Web browser
c) Database management tool
d) Graphics editor
3. Which of the following email services is typically used with the Gmail mail
client?
a) IMAP
b) FTP
c) SMTP
d) DNS
Answer: a) IMAP
4. Which protocol is commonly used for sending emails from a mail client?
a) SMTP
b) IMAP
c) POP3
d) HTTP
Answer: a) SMTP
5. What does POP3 stand for in email systems?
6. Which mail client is commonly used for sending and receiving emails
through Gmail?
7. What is the main advantage of using IMAP over POP3 for email clients?
a) Thunderbird
b) Microsoft Outlook
c) Apple Mail
d) Gmail
Answer: a) Thunderbird
10. Which of the following is a popular email client for Windows operating
systems?
a) Microsoft Outlook
b) Adobe Acrobat
c) Google Chrome
d) VLC Media Player
11. Which email client is integrated into the Microsoft Office Suite?
a) Microsoft Outlook
b) Thunderbird
c) Apple Mail
d) Postbox
12. What is the full form of the acronym "SMTP" used in email services?
13. Which of the following protocols does IMAP allow for email clients to use?
a) Microsoft Outlook
b) Thunderbird
c) Gmail
d) Apple Mail
16. Which of the following email clients can be installed on mobile devices?
a) Gmail App
b) Adobe Acrobat
c) Windows Media Player
d) WinRAR
18. Which email client is known for its ease of use and integration with
Windows operating systems?
a) Microsoft Outlook
b) Thunderbird
c) Gmail
d) Apple Mail
19. Which protocol is used for retrieving email from an email server to a
client?
a) POP3
b) SMTP
c) IMAP
d) HTTP
Answer: a) POP3
20. Which of the following email clients supports encrypted email messages?
a) Microsoft Outlook
b) Mozilla Firefox
c) Google Chrome
d) Windows Media Player
21. Which mail client is typically used with macOS and iOS devices?
a) Apple Mail
b) Microsoft Outlook
c) Mozilla Thunderbird
d) Gmail
22. What does the term "client" refer to in the context of email?
a) Microsoft Outlook
b) Gmail
c) Thunderbird
d) Yahoo Mail
a) Carbon Copy
b) Critical Copy
c) Confidential Content
d) Copy Control
27. Which of the following email clients supports the use of "smart folders"?
a) Microsoft Outlook
b) Gmail
c) Yahoo Mail
d) Mozilla Thunderbird
Answer: a) Microsoft Outlook
28. Which feature allows you to organize and filter your emails based on
certain criteria in email clients?
a) Rules or Filters
b) SMTP
c) Address Book
d) Contact Groups
29. Which email client supports the integration of third-party add-ins for
extended functionality?
a) Microsoft Outlook
b) Thunderbird
c) Yahoo Mail
d) Gmail
31. What is the advantage of using cloud-based mail clients like Gmail over
traditional desktop mail clients?
a) Microsoft Outlook
b) Mozilla Thunderbird
c) Gmail
d) Apple Mail
33. Which mail client is provided as part of the Microsoft Office suite?
a) Microsoft Outlook
b) Thunderbird
c) Apple Mail
d) Mozilla Firefox
35. Which of the following email clients is most commonly used for accessing
Yahoo Mail?
36. What is the primary use of the "Archive" function in Gmail and other
mail clients?
37. Which of the following email clients has the feature of "Smart Compose"
for writing emails?
a) Gmail
b) Microsoft Outlook
c) Yahoo Mail
d) Apple Mail
Answer: a) Gmail
38. Which email client is designed for managing a business’s emails and
calendars?
a) Microsoft Outlook
b) Gmail
c) Mozilla Thunderbird
d) Yahoo Mail
40. What is the primary function of the "Auto-Reply" feature in email clients?
a) Gmail
b) Yahoo Mail
c) Microsoft Outlook
d) Thunderbird
Answer: a) Gmail
42. Which of the following email clients allows for the creation of custom
email signatures?
a) Microsoft Outlook
b) Mozilla Thunderbird
c) Gmail
d) Yahoo Mail
43. What is the function of the "Send Later" option in email clients like
Gmail?
44. Which email client is designed specifically for people using Apple's
ecosystem?
a) Apple Mail
b) Gmail
c) Microsoft Outlook
d) Yahoo Mail
45. Which of the following is a key feature of the Outlook email client?
a) Integration with Microsoft Exchange
b) Built-in photo editing tools
c) Free cloud storage
d) Video chat support
47. Which mail client allows you to filter emails by subject, sender, and other
criteria?
a) Microsoft Outlook
b) Apple Mail
c) Mozilla Thunderbird
d) Gmail
48. Which email client is primarily used for corporate email systems?
a) Microsoft Outlook
b) Yahoo Mail
c) Gmail
d) Apple Mail
49. Which mail client offers a calendar and task management feature along
with email?
a) Microsoft Outlook
b) Gmail
c) Yahoo Mail
d) Thunderbird
Answer: a) Microsoft Outlook
50. Which email client offers integration with third-party services such as
Slack and Trello?
a) Microsoft Outlook
b) Gmail
c) Yahoo Mail
d) Thunderbird
a) A Record
b) CNAME
c) MX
d) TXT
Answer: a) A Record
a) Shared hosting
b) VPS hosting
c) Dedicated hosting
d) Cloud hosting
10. Which DNS record type is used to associate a domain with a mail server?
a) MX record
b) A record
c) CNAME
d) TXT record
Answer: a) MX record
11. What is the main advantage of using a Virtual Private Server (VPS) over
shared hosting?
Answer: a) It can take up to 48 hours for DNS changes to take effect globally
13. What is the primary difference between shared hosting and dedicated
hosting?
16. Which type of hosting allows a website to scale resources based on traffic
demand?
a) Shared hosting
b) VPS hosting
c) Dedicated hosting
d) Cloud hosting
17. Which of the following is a DNS record used for domain verification?
a) TXT record
b) A record
c) CNAME record
d) MX record
19. Which hosting type allows full control over the server and is suitable for
large businesses?
a) Dedicated hosting
b) Shared hosting
c) VPS hosting
d) Cloud hosting
a) The time it takes for DNS changes to update across the internet
b) The time it takes to set up a hosting account
c) The time it takes to upload a website to a server
d) The time it takes to secure a website
Answer: a) The time it takes for DNS changes to update across the internet
22. Which of the following is an example of a domain registrar?
a) GoDaddy
b) BlueHost
c) HostGator
d) Amazon Web Services
Answer: a) GoDaddy
a) CNAME record
b) A record
c) MX record
d) TXT record
25. Which of the following DNS record types is used for defining the name of
the mail server for a domain?
a) A record
b) MX record
c) CNAME record
d) TXT record
Answer: b) MX record
27. Which of the following is used to manage web hosting resources like
storage, bandwidth, and databases?
a) Shared hosting
b) VPS hosting
c) Dedicated hosting
d) Cloud hosting
29. What does the "TTL" (Time to Live) value in DNS settings control?
30. Which of the following web hosting types is most cost-effective for small
businesses?
a) Dedicated hosting
b) Shared hosting
c) VPS hosting
d) Cloud hosting
a) TXT record
b) CNAME record
c) A record
d) MX record
Answer: a) Faster loading times by serving content from multiple global locations
33. Which DNS record is typically used to associate a domain with an SSL
certificate?
a) A record
b) TXT record
c) MX record
d) CNAME record
35. What is the main advantage of using a dedicated server for hosting?
36. What is the primary difference between VPS hosting and shared hosting?
a) VPS hosting provides isolated resources, while shared hosting shares resources
b) VPS hosting has unlimited bandwidth
c) VPS hosting is free, while shared hosting is not
d) VPS hosting is slower
Answer: a) VPS hosting provides isolated resources, while shared hosting shares
resources
Answer: a) To control the amount of data transferred to and from the website
39. Which of the following services is typically included with most web hosting
plans?
a) Cloud hosting
b) Dedicated hosting
c) VPS hosting
d) Shared hosting
a) A record
b) CNAME record
c) MX record
d) TXT record
Answer: a) Limited resources and performance due to sharing with other websites
a) Static websites have fixed content, while dynamic websites can change content
based on user interaction
b) Static websites are faster than dynamic websites
c) Dynamic websites require no programming
d) Static websites can include interactive elements
Answer: a) Static websites have fixed content, while dynamic websites can change
content based on user interaction
a) HTML
b) PHP
c) CSS
d) Static HTML
Answer: b) PHP
a) Dynamic websites
b) Static websites
c) Both are equally easy
d) Neither is easy to develop
a) JavaScript
b) HTML
c) CSS
d) XML
Answer: a) JavaScript
a) HTML and CSS files that remain constant unless manually updated
b) Dynamic content generated by scripts
c) Content stored in a database
d) A content management system
Answer: a) HTML and CSS files that remain constant unless manually updated
a) HTML5
b) WordPress
c) CSS3
d) Bootstrap
Answer: b) WordPress
a) Dynamic websites
b) Static websites
c) Both are equally complex
d) Neither requires maintenance
Answer: a) Dynamic websites
a) PHP
b) HTML
c) JavaScript
d) CSS
Answer: a) PHP
a) To provide styling
b) To add interactivity and dynamic content to the page
c) To store website data
d) To handle server requests
Answer: a) It has content that can change or update based on user actions
22. What kind of database is commonly used with dynamic websites?
a) MySQL
b) Microsoft Word
c) Excel
d) XML files
Answer: a) MySQL
a) Static website
b) Online shopping cart
c) Content management system
d) Blog with dynamic posts
a) JavaScript
b) PHP
c) Python
d) HTML
Answer: a) JavaScript
35. What makes dynamic websites more flexible than static websites?
37. Which type of website usually requires more complex hosting setups?
a) Static websites
b) Dynamic websites
c) Both require similar setups
d) None require hosting
a) Dynamic websites
b) Static websites
c) Both load equally fast
d) Dynamic websites with cache
a) WordPress
b) Notepad++
c) Sublime Text
d) FileZilla
Answer: a) WordPress
41. Which scripting language is often used for frontend dynamic content?
a) JavaScript
b) PHP
c) Ruby
d) Java
Answer: a) JavaScript
a) Dynamic websites
b) Static websites
c) Both types of websites
d) Neither type of website
Answer: b) User interaction with the website that changes its content
a) Static websites
b) Dynamic websites
c) Both static and dynamic websites
d) None
48. Which of the following is a common tool for building dynamic websites?
a) Drupal
b) Flash
c) Photoshop
d) Dreamweaver
Answer: a) Drupal
a) A design approach where the layout adapts to the size of the screen
b) A design approach that ensures websites are mobile-friendly
c) A design for desktop-only websites
d) A method of designing for large screens only
a) It ensures the website is accessible across devices with varying screen sizes
b) It makes the website look good only on desktop computers
c) It requires the website to be rewritten for each device
d) It makes the website faster to load
Answer: a) It ensures the website is accessible across devices with varying screen sizes
a) media queries
b) background-image
c) z-index
d) font-size
Answer: c) A rule used to apply different styles based on screen size and device type
Answer: b) A grid that uses percentages rather than pixels for layout
a) 768px
b) 1024px
c) 2560px
d) 512px
Answer: a) 768px
9. What is the purpose of the viewport meta tag in responsive web design?
Answer: c) To control the layout on mobile devices by setting the viewport width
10. How does a responsive web design adapt to different screen sizes?
Answer: c) It adjusts the layout, images, and content based on the screen size
11. Which of the following CSS properties is used for making a flexible
layout?
a) flexbox
b) grid-template-columns
c) float
d) display:inline
Answer: a) flexbox
a) They are relative units used to scale elements based on the font size
b) They represent fixed sizes
c) They define margins for text
d) They are used to create non-resizable images
Answer: a) They are relative units used to scale elements based on the font size
Answer: b) To set the font size relative to the root element's font size
14. What is one advantage of using responsive design over a separate mobile
site?
15. What is the typical layout pattern used in responsive web design?
a) Fixed-width design
b) Fluid layout with flexible grids and images
c) Parallax scrolling
d) Horizontal scrolling
16. How can you make text more legible on mobile devices?
Answer: b) Designing for mobile devices first, then scaling up for larger devices
18. Which of the following is the correct media query for targeting screens
with a width of 600px or less?
a) 1280px
b) 1920px
c) 320px to 480px
d) 1024px
20. What does the term "adaptive design" refer to in web design?
Answer: c) A design approach where the layout adjusts based on predefined screen sizes
a) display: block
b) display: flex
c) position: absolute
d) position: relative
Answer: b) display: flex
23. Which of the following design patterns is typically used in responsive web
design?
25. How can media queries be combined for different screen sizes?
28. Why should you use relative units like percentages, em, or rem in
responsive web design?
a) To ensure that elements scale according to the screen size and resolution
b) To reduce the file size of the website
c) To create fixed widths
d) To increase the speed of the website
Answer: a) To ensure that elements scale according to the screen size and resolution
30. How can you optimize a website for mobile devices in responsive design?
a) Fixed-width grids
b) Flexible grid layouts using percentages
c) Static images
d) Horizontal scrolling
Answer: b) Use image resizing techniques or the srcset attribute for responsive images
35. What does the CSS property "max-width: 100%" do for images in a
responsive layout?
Answer: d) It allows the image to scale down proportionally but not exceed its
container’s width
36. Which device is most likely to use the "small" breakpoint in a responsive
layout?
a) Smartphone
b) Desktop computer
c) Tablet
d) Laptop
Answer: a) Smartphone
37. Which of the following is a common issue when using responsive web
design?
Answer: b) Slow load times due to large images and unoptimized content
38. What type of CSS layout module is used to create flexible, responsive page
layouts in CSS3?
a) Flexbox
b) Grid
c) Float
d) Table layout
Answer: a) Flexbox
a) 320px
b) 480px
c) 768px
d) 1024px
Answer: c) 768px
40. What is the benefit of the "srcset" attribute in responsive web design?
a) It allows the browser to choose the appropriate image based on the device's
resolution and size
b) It makes images static across devices
c) It sets the width of the image on all devices
d) It ensures images are compressed for faster loading
Answer: a) It allows the browser to choose the appropriate image based on the device's
resolution and size
41. What does the term "fluid typography" refer to in responsive design?
Answer: a) A layout that adjusts its columns based on the screen size
44. Which of the following is NOT typically recommended for responsive web
design?
45. How can media queries be used to adjust text sizes in responsive design?
Answer: b) By using relative units like em and rem inside media queries
a) It targets screens that are equal to or wider than the specified width
b) It targets only small screens
c) It targets screens with a width less than the specified value
d) It adjusts the content to be larger than the screen
Answer: a) It targets screens that are equal to or wider than the specified width
Answer: c) Designing for mobile users first, then scaling up for larger devices
a) 320px
b) 1024px
c) 480px
d) 768px
Answer: b) 1024px
50. What is the importance of the viewport meta tag in responsive web
design?
a) To allow different applications to communicate with each other over the web
b) To encrypt user data
c) To store large amounts of data
d) To speed up a website’s loading time
Answer: a) To allow different applications to communicate with each other over the
web
3. Which protocol is commonly used for web services communication?
a) FTP
b) HTTP/HTTPS
c) SMTP
d) SSH
Answer: b) HTTP/HTTPS
a) REST API
b) Local server
c) DNS server
d) FTP server
7. What is the most commonly used format for data exchange in RESTful
APIs?
a) JSON
b) XML
c) CSV
d) YAML
Answer: a) JSON
9. What HTTP method is used to retrieve data from a server in REST API?
a) POST
b) GET
c) PUT
d) DELETE
Answer: b) GET
10. Which of the following HTTP methods is used to update existing data on a
server?
a) GET
b) POST
c) PUT
d) DELETE
Answer: c) PUT
a) 200
b) 400
c) 404
d) 500
Answer: c) 404
a) REST
b) WIS
c) SOAP
d) GraphQL
Answer: b) WIS
a) SSL
b) OAuth
c) SSH
d) FTP
Answer: b) OAuth
a) The location where the client sends requests to interact with the server
b) The specific URL or URI where the web service is accessed
c) The format of the data returned by the server
d) The security key used for API access
Answer: b) The specific URL or URI where the web service is accessed
Answer: c) A server that manages and routes API requests to the appropriate backend
services
a) FTP
b) HTTP
c) SOAP
d) SMTP
Answer: a) FTP
a) REST
b) SOAP
c) JSON
d) YAML
Answer: b) SOAP
Answer: c) Web services from different vendors can work together and communicate
a) GET
b) POST
c) PUT
d) DELETE
Answer: b) POST
Answer: c) They rely on XML for both message formatting and communication
Answer: c) By using standard HTTP status codes (e.g., 404 for not found, 500 for server
error)
31. What is the main difference between RESTful and SOAP web services?
32. What does the HTTP status code "500" indicate in a web service
response?
Answer: a) Uses HTTP methods like GET, POST, PUT, and DELETE
36. Which HTTP status code indicates that a resource has been successfully
created?
a) 400
b) 201
c) 404
d) 500
Answer: b) 201
37. What is the main function of the 'Accept' header in an HTTP request?
a) It specifies the media type the client expects from the server
b) It defines the request timeout
c) It stores the request body data
d) It defines the language preference
Answer: a) It specifies the media type the client expects from the server
38. Which of the following is a type of Web Service that uses REST
architecture?
a) WSDL
b) RESTful API
c) SOAP API
d) HTTP
39. Which of the following tools can be used for testing Web APIs?
a) Postman
b) WordPress
c) MySQL
d) Apache Server
Answer: a) Postman
40. What does the term "stateless" mean in the context of RESTful APIs?
Answer: b) Limiting the number of API requests a client can make in a given time
period
a) API Keys
b) OAuth tokens
c) Base64 encoding
d) SHA256 hashing
Answer: b) OAuth tokens
Answer: c) It controls how long the response data can be cached by the client or
intermediary servers
a) 200
b) 401
c) 404
d) 500
Answer: b) 401
a) GET
b) POST
c) DELETE
d) PUT
Answer: c) DELETE
W3C STANDARDS
a) Tim Berners-Lee
b) Vint Cerf
c) Mark Zuckerberg
d) Steve Jobs
Answer: b) The fifth revision of the HTML standard used to create and display web
pages
a) XMLHttpRequest
b) SOAP
c) CSS3
d) SVG
Answer: a) XMLHttpRequest
a) HTML
b) SVG (Scalable Vector Graphics)
c) JavaScript
d) JPEG
Answer: b) To allow the encoding and sharing of data between different systems
a) HTML Forms
b) SVG
c) XML
d) CSS3
Answer: b) To check the syntax of HTML and XHTML code against W3C standards
a) File compression
b) Cross-Origin Resource Sharing (to allow web pages to make requests across
different domains)
c) Server-side rendering
d) Image optimization
Answer: b) Cross-Origin Resource Sharing (to allow web pages to make requests across
different domains)
21. Which of the following W3C standards supports the creation of web fonts?
a) SVG
b) Web Open Font Format (WOFF)
c) HTTP
d) WebAssembly
23. What is the "W3C Web Content Accessibility Guidelines (WCAG)" used
for?
26. Which of the following is the W3C standard for writing styles for web
pages?
a) JavaScript
b) CSS (Cascading Style Sheets)
c) HTML
d) JSON
Answer: b) To define a common set of schemas for structured data on the web
28. What does the W3C standard for "HTML5 Web Storage" allow?
30. Which W3C standard is used for improving security on the web?
a) HTTPS
b) HTTP/1.1
c) HTML5
d) HTTP/2
Answer: a) HTTPS
33. Which W3C standard is used to define the rules for displaying multimedia
content on the web?
a) CSS
b) HTML5 Video and Audio
c) JavaScript
d) XML
Answer: b) HTML5 Video and Audio
35. What is the W3C's "Mobile Web Best Practices" focused on?
Answer: b) To structure JSON data for easier integration with Linked Data
a) Website security
b) The performance of HTTP connections
c) The structure of HTML tags
d) File compression techniques
40. What does the W3C’s "Content Security Policy (CSP)" standard help
with?
41. Which of the following best describes the W3C’s "HTML5 Web Storage"?
Answer: a) A way to store data locally in a web browser for later use
a) To store images
b) To draw graphics and animations on a web page
c) To display multimedia content
d) To animate videos
a) HTML5
b) CSS3
c) JavaScript
d) WebAssembly
Answer: a) HTML5
a) Website aesthetics
b) Making websites and web applications accessible to users from different
cultures and languages
c) Web browser development
d) Content security
Answer: b) Making websites and web applications accessible to users from different
cultures and languages
47. Which of the following is true about the W3C’s "Web of Things (WoT)"
standard?
a) It connects everyday physical objects to the web
b) It is focused on improving website aesthetics
c) It allows users to make secure online payments
d) It improves mobile app compatibility
a) Data encryption
b) The creation and distribution of digital books and publications
c) Video streaming services
d) Web server management