MCQ Bank
Math.floor() does:
- A) Divide number
- B) Round up
- C) Random number
- D) Round down
What does “self-describing syntax” in XML mean?
- A) XML needs external explanation
- B) XML cannot be read by humans
- C) XML explains itself using tags
- D) XML is only for programming
Which method selects siblings between elements in a range?
- A) nextUntil()
- B) next()
- C) prev()
- D) siblings()
In hide(speed, callback), callback runs:
- A) After hide completes
- B) During hide
- C) Never
- D) Before hide
What will the following code return? $("p").css("background-color");
- A) Background color of all <p> elements
- B) Background color of last <p> element
- C) Background color of first matched <p> element
- D) Returns the CSS property name only
Why is XML useful when data changes frequently?
- A) Because data can be stored separately from HTML
- B) Because HTML must be rewritten
- C) Because it only works offline
- D) Because XML automatically deletes data
The hover() method combines:
- A) click + dblclick
- B) keydown + keyup
- C) mouseenter + mouseleave
- D) focus + blur
What is the top element of an XML tree called?
- A) Child element
- B) Root element
- C) Leaf element
- D) Attribute
How can multiple classes be added using addClass()?
- A) addClass("class1 class2")
- B) addClass(["class1", "class2"])
- C) addClass("class1+class2")
- D) addClass("class1, class2")
What is the correct syntax of $.get()?
- A) $.get(callback)
- B) $.get()
- C) $.get(URL, callback)
- D) $.get(data, URL)
Which syntax is used to assign a click event in jQuery?
- A) $("p").click()
- B) $("p").trigger(click)
- C) $("p").onClick()
- D) $("p").event(click)
Which parameter in load() runs after content is loaded?
- A) method
- B) data
- C) callback function
- D) URL
slideUp() is used to:
- A) Resize element
- B) Fade element
- C) Show element
- D) Hide element with slide effect
Which method fades in elements?
- A) fadeIn()
- B) show()
- C) hide()
- D) fadeOut()
slideDown() does what?
- A) Shows element with sliding effect
- B) Hides element
- C) Moves element
- D) Deletes element
What does next() method return?
- A) Previous sibling
- B) The immediate next sibling only
- C) Parent element
- D) All next siblings
Which syntax is used to get a CSS property value?
- A) css("propertyname")
- B) css(property, value)
- C) css()
- D) getCss("property")
animate() syntax includes:
- A) speed
- B) All of these
- C) callback
- D) params
Which jQuery method returns the width including padding?
- A) innerWidth()
- B) height()
- C) outerWidth()
- D) width()
Which of the following is NOT a common use of XML?
- A) Game graphics rendering
- B) Stock information
- C) Financial transactions
- D) Weather services