CS202 FROM Week (7-16) BY MOIN AKHTAR
CS202 FROM Week (7-16) BY MOIN AKHTAR
1. What is jQuery?
a) A programming language
b) A JavaScript framework
c) A database management system
d) A markup language
a) Database management
b) HTML document traversal and manipulation
c) Graphic design
d) Network security
a) HTML/DOM manipulation
b) CSS manipulation
c) Video editing
d) AJAX
Answer: c) By using the `<script>` tag and referencing the jQuery file
Answer: b) To wait for the document to be fully loaded before executing jQuery code
a) `$(function(){...})`
b) `$(document).load(function(){...})`
c) `$(html).ready(function(){...})`
d) `$(body).load(function(){...})`
Answer: a) `$(function(){...})`
a) `$("p")`
b) `$("#p")`
c) `$(".p")`
d) `element.select("p")`
Answer: a) `$("p")`
a) `$("#test")`
b) `$(".test")`
c) `$("test")`
d) `element.select("#test")`
CS202 MADE BY MOIN AKHTAR
Answer: a) `$("#test")`
a) `$("p").function(){};`
b) `$("p").click(){};`
c) `$("p").on("click", function(){});`
d) `$("p").event(function(){});`
14. Which jQuery method is used to execute a function when the document is fully loaded?
a) `document.load()`
b) `$(document).ready()`
c) `$(document).load()`
d) `document.ready()`
Answer: b) `$(document).ready()`
a) `hover()`
b) `on()`
c) `click()`
d) `focus()`
Answer: a) `hover()`
18. How can you attach multiple event handlers to an element in jQuery using the `on()` method?
a) `$("p").on("click", function(){});`
b) `$("p").eventHandlers({...});`
c) `$("p").multipleEvents({...});`
d) `$("p").on({...});`
19. Which event method is used for both mouseup and mousedown events in jQuery?
a) `click()`
b) `hover()`
c) `on()`
d) `mouseupdown()`
Answer: c) `on()`
Which jQuery method is used to traverse up the DOM tree and return the direct parent element?
a) parent()
b) parents()
c) parentElement()
d) up()
Answer: a) parent()
23. How does the children() method differ from the find() method in jQuery?
Answer: b) children() returns direct children, while find() returns all descendants
24. Which method is used to traverse sideways in the DOM tree and returns all sibling elements?
a) siblings()
CS202 MADE BY MOIN AKHTAR
b) next()
c) prev()
d) find()
Answer: a) siblings()
Answer: b) Returns all next sibling elements between two given arguments
26. How can you select the first element of a group of elements in jQuery?
a) first()
b) start()
c) initial()
d) primary()
Answer: a) first()
a) reject()
b) negate()
c) not()
CS202 MADE BY MOIN AKHTAR
d) exclude()
Answer: c) not()
31. Which jQuery method is used to load data from a server and put it into a selected element?
a. $.ajax()
b. $.get()
c. $.load()
d. $.post()
Answer: c. $.load()
32. What is the purpose of the callback function in the jQuery load() method?
a. GET
b. POST
c. PUT
d. DELETE
Answer: a. GET
Answer: c. XML Schema uses XML syntax, while DTD does not
Answer: c) JSON is shorter and quicker to read and write than XML
a) `<sound>`
b) `<audio>`
c) `<music>`
d) `<play>`
Answer: b) `<audio>`
CS202 MADE BY MOIN AKHTAR
Answer: B
47. Which method is used to get the geographical position of a user in HTML Geolocation?
a) `getLocation()`
b) `retrievePosition()`
c) `getCurrentPosition()`
d) `findUserPosition()`
Answer: C. `getCurrentPosition()`
48. What does the `controls` attribute do in the HTML `<video>` element?
a) Adds video editing options
b) Adds video playback controls
c) Enables autoplay
d) Specifies video file formats
49. Which file formats are currently supported for the `<audio>` element in HTML?
a) `terminateWorker()`
b) `stopWorker()`
c) `killWorker()`
d) `terminate()`
Answer: D. `terminate()`
51. What is the purpose of the `ondragover` event in HTML Drag and Drop?
CS202 MADE BY MOIN AKHTAR
52. Which section in the Cache Manifest file specifies files to be cached after the first download?
a) `NETWORK`
b) `FALLBACK`
c) `CACHE MANIFEST`
d) `CACHE`
a) Elements
b) Modules
c) Sections
d) Tags
Answer: b) Modules
55. Which CSS3 module is responsible for specifying the position of background images?
a) Selectors
b) Box Model
c) Backgrounds and Borders
d) Animations
How can you create rounded corners for an element using CSS3?
Answer: b) Specify an image to be used instead of the normal border around an element
57. Which CSS3 property allows you to add multiple background images for an element?
a) background-size
b) background-origin
c) background-clip
d) background-image
Answer: d) background-image
a) Background color
b) Text color
c) Element visibility
d) Font size
a) box-shadow
b) text-shadow
c) shadow-effect
CS202 MADE BY MOIN AKHTAR
d) element-shadow
Answer: a) box-shadow
Answer: b) An approach for crafting sites that provide an optimal viewing experience on all devices
Answer: c) It aims to offer an optimal viewing and interaction experience on all devices
Answer: d) Provides instructions on how to control the page's dimensions and scaling
a) 6
b) 8
c) 10
d) 12
Answer: d) 12
70. What does "Mobile First" design mean in responsive web design?
71. How can media queries be used to change the layout based on device orientation?
72. What does the `width: 100%; height: auto;` CSS property do for images in responsive web
design?
a) Bill Gates
b) Mark Otto and Jacob Thornton
c) Steve Jobs
d) Elon Musk
a) Easy to use
b) Responsive features
c) Mobile-first approach
d) Faster server processing
77. What classes are used in Bootstrap's grid system for different screen sizes?
a) s, m, l, xl
b) xs, sm, md, lg
c) small, medium, large, x-large
d) grid-xs, grid-sm, grid-md, grid-lg
a) 12px
b) 14px
c) 16px
d) 18px
Answer: b) 14px
a) .img-rounded
b) .img-circle
c) .img-thumbnail
d) .img-round
Answer: a) .img-rounded
CS202 MADE BY MOIN AKHTAR
a) .jumbotron
b) .hero-unit
c) .big-box
d) .container-jumbo
Answer: a) .jumbotron
a) .btn-default
b) .btn-primary
c) .btn-info
d) .btn-success
Answer: b) .btn-primary
84. Which method is NOT recommended for testing responsiveness in web design?
85. What are some features of Chrome DevTools for responsive testing?
a. Mark Zuckerberg
b. Tim Berners-Lee
c. Larry Page
d. Jeff Bezos
89. Which Web Publishing Tool allows users to visually map out website structure without using
HTML coding?
a. Adobe PageMill
b. NetObjects Fusion
c. Macromedia Dreamweaver
d. Notepad
90. What is a key consideration for maintaining web page quality regarding fonts?
91. What is the recommended time for a website to open for the best user experience?
a. 10 seconds
b. 5 seconds
c. 1 second
d. 20 seconds
Answer: c. 1 second