Web Development Mcqs
Web Development Mcqs
HTML Questions:
1. What does HTML stand for?
A. Hyper Text Markup Language
B. High-Level Text Markup Language
C. Hyperlink and Text Markup Language
D. Hyper Transfer Markup Language
Answer: A. Hyper Text Markup Language
2. Which HTML tag is used for creating hyperlinks?
A. <link>
B. <a>
C. <href>
D. <hyper>
Answer: B. <a>
3. Which HTML element is used for creating an unordered list?
A. <ul>
B. <ol>
C. <li>
D. <list>
Answer: A. <ul>
4. In HTML, what does the <head> tag contain?
A. Document metadata
B. Body content
C. Script tags
D. Main content
Answer: A. Document metadata
5. What is the purpose of the HTML <meta> tag?
A. To define metadata about an HTML document
B. To create a hyperlink
C. To define a section in an HTML document
D. To display images
Answer: A. To define metadata about an HTML document
CSS Questions:
6. Which CSS property is used to change the text color of an element?
A. text-color
B. color
C. font-color
D. text-style
Answer: B. color
7. What does CSS stand for?
A. Counter Style Sheets
B. Computer Style Sheets
C. Cascading Style Sheets
D. Creative Style Sheets
Answer: C. Cascading Style Sheets
8. Which CSS property is used for setting the background color of an element?
A. background-color
B. color
C. background
D. bg-color
Answer: A. background-color
9. In CSS, what does the 'margin' property control?
A. Padding inside the element
B. Space outside the element
C. Border of the element
D. Width of the element
Answer: B. Space outside the element
10. Which CSS selector is used to select all elements on a page?
A. *
B. #
C. .
D. $
**Answer: A. ***
JavaScript Questions:
11. What does JavaScript primarily add to a website?
A. Styling
B. Interactivity
C. Structure
D. Layout
Answer: B. Interactivity
12. Which keyword is used to declare variables in JavaScript?
A. var
B. variable
C. int
D. declare
Answer: A. var
13. What is the purpose of the JavaScript function addEventListener?
A. To add numbers
B. To handle events
C. To create elements
D. To style elements
Answer: B. To handle events
14. What is the purpose of the typeof operator in JavaScript?
A. To find the type of a variable
B. To create a new variable
C. To concatenate strings
D. To declare a function
Answer: A. To find the type of a variable
15. Which built-in method is used to print content to the console in JavaScript?
A. log()
B. print()
C. display()
D. console()
Answer: A. log()
Responsive Design and Bootstrap Questions:
16. What is the primary purpose of media queries in CSS for responsive design?
A. To create animations
B. To apply styles based on screen size
C. To define font styles
D. To handle user input
Answer: B. To apply styles based on screen size
17. Which class in Bootstrap is used for creating a responsive navigation bar?
A. .navbar
B. .nav
C. .navigation
D. .navbar-toggle
Answer: A. .navbar
18. In Bootstrap, which grid class is used for extra small screens?
A. .col-lg
B. .col-md
C. .col-xs
D. .col-sm
Answer: C. .col-xs
19. What does the Bootstrap class container do?
A. Centers content on the page
B. Creates a full-width container
C. Adds padding to the content
D. Sets the background color
Answer: A. Centers content on the page
20. Which Bootstrap component is used for creating a responsive image carousel?
A. .carousel
B. .slider
C. .image-slider
D. .carousel-item
Answer: A. .carousel
jQuery Questions:
21. What is jQuery?
A. A programming language
B. A database system
C. A JavaScript library
D. An operating system
Answer: C. A JavaScript library
22. Which jQuery method is used to hide elements?
A. hide()
B. hidden()
C. disappear()
D. remove()
Answer: A. hide()
23. How can you include jQuery in an HTML document?
A. <script src="jquery.js"></script>
B. <link rel="jquery" href="jquery.js">
C. <include jquery.js>
D. <script type="text/javascript" src="jquery.js"></script>
Answer: A. <script src="jquery.js"></script>
24. What is the purpose of the $(document).ready() function in jQuery?
A. To define document styles
B. To wait for the HTML document to be fully loaded before executing
JavaScript
C. To create animations
D. To handle user input
Answer: B. To wait for the HTML document to be fully loaded before executing
JavaScript
25. Which jQuery method is used to set content?
A. set()
B. content()
C. html()
D. text()
Answer: C. html()
Front-End Frameworks Questions:
26. Which of the following is not a front-end framework?
A. React
B. Angular
C. Django
D. Vue.js
Answer: C. Django
27. What is the purpose of a front-end framework?
A. To handle server-side logic
B. To create responsive and interactive user interfaces
C. To manage databases
D. To handle authentication
Answer: B. To create responsive and interactive user interfaces
28. Which front-end framework is developed by Facebook?
A. Angular
B. React
C. Vue.js
D. Bootstrap
Answer: B. React
29. In React, what is the virtual DOM?
A. A virtual representation of the DOM elements in memory
B. A placeholder for actual DOM elements
C. A separate DOM structure for mobile devices
D. A special container for DOM animations
Answer: A. A virtual representation of the DOM elements in memory.