Here are 100+ MCQs based on all the units
1 1. What is the Internet?
A) A collection of web pages
B) A global network of connected devices
C) A type of web browser
D) A single large server
Answer: B) A global network of connected devices
2 2. What does WWW stand for?
A) World Wide Web
B) Web Wide Window
C) Wireless Web World
D) Wide Web Window
Answer: A) World Wide Web
3 3. What is a web browser used for?
A) Hosting websites
B) Searching for websites
C) Viewing and interacting with web pages
D) Storing files on the internet
Answer: C) Viewing and interacting with web pages
4 4. Which of the following is NOT a search engine?
A) Google
B) Bing
C) Yahoo
D) Linux
Answer: D) Linux
5 5. What is the role of a web server?
A) To store and serve web pages
B) To act as an internet service provider
C) To browse websites
D) To create web pages
Answer: A) To store and serve web pages
6 6. What is the full form of HTML?
A) Hyper Text Transmission Language
B) Hyper Text Markup Language
C) High-Level Text Markup Language
D) Hyperlink and Text Marking Language
Answer: B) Hyper Text Markup Language
7 7. Which of the following is a correct HTML tag for inserting a line break?
A) <br>
B) <lb>
C) <break>
D) <newline>
Answer: A) <br>
8 8. What is the function of the <title> tag in HTML?
A) Defines the title of the document
B) Displays the heading on the web page
C) Creates a hyperlink
D) Formats the text
Answer: A) Defines the title of the document
9 9. Which tag is used to create an ordered list in HTML?
A) <ul>
B) <ol>
C) <li>
D) <list>
Answer: B) <ol>
10 10. Which of the following is NOT a type of CSS?
A) Inline CSS
B) Internal CSS
C) External CSS
D) Indexed CSS
Answer: D) Indexed CSS
11 11. What is JavaScript mainly used for?
A) Styling web pages
B) Adding interactivity to web pages
C) Creating databases
D) Hosting websites
Answer: B) Adding interactivity to web pages
12 12. Which of the following is a JavaScript data type?
A) Number
B) Boolean
C) String
D) All of the above
Answer: D) All of the above
13 13. What is the correct way to declare a JavaScript function?
A) def myFunction() {}
B) function myFunction() {}
C) void myFunction() {}
D) fn myFunction() {}
Answer: B) function myFunction() {}
14 14. Which JavaScript event occurs when a user clicks on an element?
A) onmouseover
B) onchange
C) onclick
D) onkeydown
Answer: C) onclick
15 15. What does jQuery mainly simplify?
A) Server-side scripting
B) Complex JavaScript code
C) Database management
D) File handling
Answer: B) Complex JavaScript code
16 16. What is PHP primarily used for?
A) Creating web pages
B) Styling web pages
C) Server-side scripting
D) Web hosting
Answer: C) Server-side scripting
17 17. PHP is a ________ language.
A) Client-side scripting
B) Server-side scripting
C) Markup
D) Compiled
Answer: B) Server-side scripting
18 18. Which PHP function is used to output text?
A) print()
B) display()
C) echo
D) write()
Answer: C) echo
19 19. How do you declare an array in PHP?
A) array = (1, 2, 3);
B) $arr = array(1, 2, 3);
C) $arr[] = {1, 2, 3};
D) array[1, 2, 3];
Answer: B) $arr = array(1, 2, 3);
20 20. What is MySQL?
A) A programming language
B) A database management system
C) A web server
D) A search engine
Answer: B) A database management system
21 21. What does SQL stand for?
A) Structured Query Language
B) System Query Language
C) Structured Question Language
D) Sequential Query Language
Answer: A) Structured Query Language
22 22. Which SQL command is used to retrieve data?
A) FETCH
B) RETRIEVE
C) SELECT
D) GET
Answer: C) SELECT
23 23. What does a database store?
A) Images only
B) Text only
C) Structured data
D) Videos only
Answer: C) Structured data
24 24. What is a cookie in web development?
A) A web page feature
B) A small piece of data stored in the user's browser
C) A virus
D) A security threat
Answer: B) A small piece of data stored in the user's browser
25 25. Which function is used to start a session in PHP?
A) start_session();
B) session_begin();
C) session_start();
D) begin_session();
Answer: C) session_start();
26 More MCQs (Advanced Concepts)
27 26. What is the difference between HTTP and HTTPS?
A) HTTPS is more secure than HTTP
B) HTTP is faster than HTTPS
C) HTTPS does not encrypt data
D) HTTP and HTTPS are the same
Answer: A) HTTPS is more secure than HTTP
28 27. Which of the following is a front-end technology?
A) JavaScript
B) PHP
C) MySQL
D) Apache
Answer: A) JavaScript
29 28. What is the purpose of an API?
A) To create animations
B) To interact with databases
C) To allow communication between software applications
D) To store cookies
Answer: C) To allow communication between software applications
30 29. Which CSS property is used for responsive design?
A) float
B) grid-template
C) media queries
D) align-center
Answer: C) media queries
31 30. Which of the following is NOT a type of web hosting?
A) Shared hosting
B) Dedicated hosting
C) Offline hosting
D) Cloud hosting
Answer: C) Offline hosting
Here are 70+ additional MCQs, expanding on all topics from your documents.
32 31. What does a URL specify?
A) A website’s IP address
B) The address of a resource on the internet
C) The name of a search engine
D) A programming language
Answer: B) The address of a resource on the internet
33 32. What is the purpose of a domain name?
A) To store website data
B) To identify a website with a human-readable address
C) To increase website speed
D) To secure the website
Answer: B) To identify a website with a human-readable address
34 33. What is a static website?
A) A website that changes frequently
B) A website that is updated dynamically
C) A website that remains the same for all users
D) A website that only contains animations
Answer: C) A website that remains the same for all users
35 34. What is a dynamic website?
A) A website with no user interaction
B) A website where content changes based on user input
C) A website with only HTML and CSS
D) A website that does not load quickly
Answer: B) A website where content changes based on user input
36 35. Which protocol is used for secure data transfer over the internet?
A) HTTP
B) FTP
C) HTTPS
D) SMTP
Answer: C) HTTPS
37 36. What is the purpose of the <meta> tag in HTML?
A) To add images
B) To define metadata for a document
C) To create forms
D) To make a website faster
Answer: B) To define metadata for a document
38 37. Which tag is used to create a hyperlink in HTML?
A) <link>
B) <a>
C) <href>
D) <url>
Answer: B) <a>
39 38. What is the correct syntax for adding an image in HTML?
A) <image src="image.jpg">
B) <img href="image.jpg">
C) <img src="image.jpg" alt="My Image">
D) <src img="image.jpg">
Answer: C) <img src="image.jpg" alt="My Image">
40 39. What does CSS stand for?
A) Colorful Style Sheets
B) Cascading Style Sheets
C) Computer Style Sheets
D) Creative Style Sheets
Answer: B) Cascading Style Sheets
41 40. Which property is used to change the background color in CSS?
A) color
B) background
C) background-color
D) bgcolor
Answer: C) background-color
42 41. What is JavaScript mainly used for?
A) To create static web pages
B) To add interactivity to web pages
C) To style web pages
D) To manage databases
Answer: B) To add interactivity to web pages
43 42. How do you write a comment in JavaScript?
A) <!-- This is a comment -->
B) /* This is a comment */
C) // This is a comment
D) # This is a comment
Answer: C) // This is a comment
44 43. Which JavaScript function is used to display an alert box?
A) msgBox()
B) alertBox()
C) alert()
D) popup()
Answer: C) alert()
45 44. What is the output of typeof null in JavaScript?
A) null
B) undefined
C) object
D) string
Answer: C) object
46 45. Which of the following is NOT a valid JavaScript data type?
A) Number
B) String
C) Float
D) Boolean
Answer: C) Float
47 46. What does PHP stand for?
A) Preprocessed Hypertext Pages
B) Personal Home Pages
C) PHP: Hypertext Preprocessor
D) Processed HTML Pages
Answer: C) PHP: Hypertext Preprocessor
48 47. How do you define a variable in PHP?
A) var name = "John";
B) $name = "John";
C) string name = "John";
D) name = "John";
Answer: B) $name = "John";
49 48. Which symbol is used to concatenate strings in PHP?
A) +
B) .
C) &
D) *
Answer: B) .
50 49. What is MySQL mainly used for?
A) Front-end development
B) Storing and managing data
C) Creating animations
D) Designing web pages
Answer: B) Storing and managing data
51 50. What is the default port number for MySQL?
A) 80
B) 3306
C) 443
D) 21
Answer: B) 3306
52 51. Which of the following is NOT a NoSQL database?
A) MongoDB
B) PostgreSQL
C) Cassandra
D) CouchDB
Answer: B) PostgreSQL
53 52. What is an API?
A) A programming language
B) A software application
C) A set of rules for communication between software
D) A database management system
Answer: C) A set of rules for communication between software
54 53. Which HTTP method is used to submit form data?
A) GET
B) POST
C) PUT
D) DELETE
Answer: B) POST
55 54. Which of the following is NOT a JavaScript framework?
A) React
B) Angular
C) Laravel
D) Vue
Answer: C) Laravel
56 55. What is the role of AJAX in web development?
A) To create animations
B) To fetch data from a server without reloading the page
C) To format HTML content
D) To secure a website
Answer: B) To fetch data from a server without reloading the page
57 56. What is Bootstrap used for?
A) Creating databases
B) Styling and designing responsive web pages
C) Writing JavaScript code
D) Managing server configurations
Answer: B) Styling and designing responsive web pages
58 57. Which of the following is a valid HTTP status code for "Not Found"?
A) 200
B) 301
C) 404
D) 500
Answer: C) 404
59 58. Which of the following is an example of cloud storage?
A) Google Drive
B) Microsoft Excel
C) Mozilla Firefox
D) Visual Studio
Answer: A) Google Drive
60 59. What does CDN stand for?
A) Content Delivery Network
B) Centralized Data Network
C) Cloud Distribution Node
D) Computer Data Navigation
Answer: A) Content Delivery Network
61 60. What does the <canvas> tag in HTML do?
A) Displays a webpage background
B) Creates an area for dynamic graphics
C) Defines a CSS property
D) Embeds a video
Answer: B) Creates an area for dynamic graphics
Here are 50+ additional MCQs, covering more advanced and specific topics in web
development, bringing the total to 180+ MCQs! 🚀
62 61. What is the primary function of an Internet Service Provider (ISP)?
A) To host websites
B) To provide internet connectivity to users
C) To design websites
D) To create domain names
Answer: B) To provide internet connectivity to users
63 62. Which of the following is an example of a top-level domain (TLD)?
A) www.example.com
B) example
C) .com
D) http://example.com
Answer: C) .com
64 63. What is the full form of IP in networking?
A) Internet Profile
B) Internet Protocol
C) Information Processor
D) Internet Provider
Answer: B) Internet Protocol
65 64. What is the difference between IPv4 and IPv6?
A) IPv6 is faster than IPv4
B) IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses
C) IPv6 is only used in mobile networks
D) IPv4 does not support internet access
Answer: B) IPv4 uses 32-bit addresses, while IPv6 uses 128-bit addresses
66 65. What is the purpose of DNS?
A) To store website data
B) To translate domain names into IP addresses
C) To secure internet connections
D) To block websites
Answer: B) To translate domain names into IP addresses
67 66. Which HTML tag is used to create a drop-down menu?
A) <select>
B) <dropdown>
C) <menu>
D) <list>
Answer: A) <select>
68 67. Which attribute is used to open a hyperlink in a new tab?
A) target="_new"
B) target="_tab"
C) target="_blank"
D) target="new"
Answer: C) target="_blank"
69 68. What is the correct syntax to define an internal CSS style?
A) <css> ... </css>
B) <style> ... </style>
C) <script> ... </script>
D) <format> ... </format>
Answer: B) <style> ... </style>
70 69. Which CSS property controls text size?
A) font-style
B) font-size
C) text-size
D) size
Answer: B) font-size
71 70. What does the z-index property in CSS control?
A) The transparency of an element
B) The layering order of elements
C) The color of an element
D) The width of an element
Answer: B) The layering order of elements
72 71. What will console.log(typeof []) output in JavaScript?
A) array
B) object
C) list
D) undefined
Answer: B) object
73 72. What is the purpose of the localStorage object in JavaScript?
A) To store session data permanently
B) To store data temporarily
C) To store cookies
D) To delete cache
Answer: A) To store session data permanently
74 73. Which function is used to delay execution in JavaScript?
A) wait()
B) setTimeout()
C) delay()
D) pause()
Answer: B) setTimeout()
75 74. What will Boolean("false") return in JavaScript?
A) true
B) false
C) undefined
D) null
Answer: A) true
76 75. Which JavaScript method is used to access an element by its class name?
A) getElementById()
B) getElementsByClassName()
C) querySelector()
D) getClass()
Answer: B) getElementsByClassName()
77 76. What is the default file extension for PHP files?
A) .ph
B) .php
C) .html
D) .js
Answer: B) .php
78 77. Which superglobal variable is used to get form data in PHP?
A) $_FORM
B) $_POST
C) $_SESSION
D) $_REQUEST
Answer: B) $_POST
79 78. What will strlen("Hello") return in PHP?
A) 4
B) 5
C) 6
D) undefined
Answer: B) 5
80 79. What does mysqli_connect() do in PHP?
A) Connects PHP to a MySQL database
B) Retrieves data from a database
C) Closes the database connection
D) Deletes records from the database
Answer: A) Connects PHP to a MySQL database
81 80. Which of the following is a valid PHP array?
A) $arr = (1, 2, 3);
B) $arr = array(1, 2, 3);
C) $arr = [1, 2, 3];
D) Both B and C
Answer: D) Both B and C
82 81. What does AJAX stand for?
A) Asynchronous JavaScript and XML
B) Automated JavaScript and XHTML
C) Advanced Java Application XML
D) Applied JavaScript XML
Answer: A) Asynchronous JavaScript and XML
83 82. What is the purpose of a REST API?
A) To store website files
B) To define a website's layout
C) To allow communication between client and server
D) To optimize images
Answer: C) To allow communication between client and server
84 83. What is a responsive web design?
A) A website that loads faster
B) A website that changes its layout based on the device
C) A website that never reloads
D) A website that only works on mobile
Answer: B) A website that changes its layout based on the device
85 84. What is the purpose of a CDN (Content Delivery Network)?
A) To store JavaScript files
B) To speed up content delivery
C) To compress images
D) To create databases
Answer: B) To speed up content delivery
86 85. Which CSS framework is widely used for responsive web design?
A) React
B) Bootstrap
C) Laravel
D) Django
Answer: B) Bootstrap
87 86. What does OAuth provide?
A) User authentication
B) CSS styling
C) JavaScript interactivity
D) Web hosting
Answer: A) User authentication
88 87. Which of the following is a NoSQL database?
A) MySQL
B) MongoDB
C) PostgreSQL
D) SQLite
Answer: B) MongoDB
89 88. Which HTTP status code means "Forbidden"?
A) 200
B) 401
C) 403
D) 500
Answer: C) 403
90 89. What is the role of Git in web development?
A) To host websites
B) To manage version control
C) To create web designs
D) To store large files
Answer: B) To manage version control
91 90. What does a .htaccess file do in web development?
A) Manages server configurations
B) Creates a database
C) Stores user information
D) Optimizes images
Answer: A) Manages server configurations
92 91. Which of the following is NOT a web browser?
A) Mozilla Firefox
B) Google Chrome
C) Windows Explorer
D) Microsoft Edge
Answer: C) Windows Explorer
93 92. What is a firewall used for?
A) To store website data
B) To filter and block unauthorized network traffic
C) To boost internet speed
D) To enhance image quality on websites
Answer: B) To filter and block unauthorized network traffic
94 93. Which of the following is NOT an internet protocol?
A) HTTP
B) FTP
C) TCP/IP
D) HDMI
Answer: D) HDMI
95 94. Which device is necessary to connect to the internet?
A) Printer
B) Scanner
C) Modem
D) Joystick
Answer: C) Modem
96 95. Which is the fastest type of internet connection?
A) Dial-up
B) DSL
C) Fiber-optic
D) Satellite
Answer: C) Fiber-optic
97 96. Which HTML tag is used to create a table?
A) <table>
B) <tab>
C) <tr>
D) <td>
Answer: A) <table>
98 97. What does the <th> tag do in an HTML table?
A) Defines a table row
B) Defines a table cell
C) Defines a table header
D) Defines a table column
Answer: C) Defines a table header
99 98. Which CSS property is used to make text bold?
A) font-weight
B) text-style
C) bold-text
D) text-weight
Answer: A) font-weight
100 99. What is the correct syntax to add a background image in CSS?
A) background: image("background.jpg");
B) background-img: url("background.jpg");
C) background-image: url("background.jpg");
D) bg-image: "background.jpg";
Answer: C) background-image: url("background.jpg");
101 100. What does the position: absolute; property do in CSS?
A) Positions an element relative to its normal position
B) Positions an element relative to the nearest positioned ancestor
C) Positions an element fixed to the screen
D) Hides the element
Answer: B) Positions an element relative to the nearest positioned ancestor
102 101. What will console.log(5 == "5") return?
A) true
B) false
C) undefined
D) null
Answer: A) true
103 102. What will console.log(5 === "5") return?
A) true
B) false
C) undefined
D) null
Answer: B) false
104 103. How do you declare a constant variable in JavaScript?
A) var x = 10;
B) let x = 10;
C) const x = 10;
D) final x = 10;
Answer: C) const x = 10;
105 104. Which JavaScript function converts a string to an integer?
A) parseInt()
B) toInteger()
C) convertInt()
D) toFixed()
Answer: A) parseInt()
Created by PM😊🚀