MCQ Bank
What does the removeClass() method do in jQuery?
- A) Switches between adding and removing classes automatically
- B) Removes one or more specified classes from selected elements
- C) Applies animation effects to elements
- D) Adds one or more classes to selected elements
Queue functionality means:
- A) No order
- B) All animations run together
- C) Animation stops
- D) Animations run one by one
What must be passed to an event method to define its action?
- A) String
- B) Number
- C) Boolean
- D) Function
XML files are:
- A) Binary files
- B) Video files
- C) Encrypted files only
- D) Text files that are readable and editable
What does parentsUntil("div") do?
- A) Returns parent elements up to (but not including) the <div> element
- B) Returns sibling elements
- C) Returns all child elements
- D) Returns all parent elements
Which statement about XML element names is correct?
- A) XML element names are case-sensitive
- B) XML element names can contain spaces
- C) XML is case-insensitive
- D) XML element names can start with numbers
What does traversing mean in jQuery?
- A) Adding new elements to the DOM
- B) Changing the style of elements
- C) Moving through and finding elements in the DOM tree
- D) Deleting elements from the page
What does the width() method return in jQuery?
- A) Only margin value
- B) Width including margin
- C) Width including padding
- D) Content width only (excluding padding, border, and margin)
What does it mean that XML is “extensible”?
- A) XML cannot be modified
- B) New elements can be added without affecting existing structure
- C) XML has fixed predefined tags
- D) XML only works with HTML
What does the append() method do?
- A) Removes content
- B) Inserts content at the end of selected elements
- C) Replaces content
- D) Inserts content at the beginning
How are methods executed in a jQuery chain?
- A) In random order
- B) One after another in sequence
- C) In reverse order
- D) All at the same time
Which of the following is NOT a DOM relationship?
- A) Attribute
- B) Child
- C) Parent
- D) Sibling
In $.post(), which parameter is optional?
- A) Both Data and Callback
- B) Callback
- C) Data
- D) URL
The val() method is mainly used for:
- A) Working with images
- B) Adding animations
- C) Styling elements
- D) Getting or setting values of form fields
A callback function executes:
- A) Randomly
- B) Before effect
- C) During effect
- D) After effect completes
Which of the following is the default character encoding for XML documents?
- A) None of the given options
- B) UTF-8
- C) UTF-16
- D) UTF-32
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