📝 CSE326 Unit-6 MCQ Test

⏱️
30:00

⚡ Each correct answer carries +1 mark and each wrong answer carries -0.25 negative marking.

Question 1

What does DOM stand for?

Question 2

The DOM represents a web page as:

Question 3

Which object is the root of the DOM hierarchy?

Question 4

Which method is used to access an element by its ID?

Question 5

Which DOM method returns a collection of elements by class name?

Question 6

Which method selects the first matching element using a CSS selector?

Question 7

Which method returns all matching elements using a CSS selector?

Question 8

Which property is used to change HTML content inside an element?

Question 9

Which property is used to change only text content (without HTML)?

Question 10

Which DOM property is used to change CSS style of an element?

Question 11

How do you change text color of an element using DOM?

Question 12

Which DOM event occurs when a user clicks an element?

Question 13

Which event occurs when a key is pressed?

Question 14

Which event is triggered when the mouse moves over an element?

Question 15

Which event is triggered when the page finishes loading?

Question 16

Which property is used to add or remove CSS classes dynamically?

Question 17

Which method is used to add an event listener to an element?

Question 18

Which method removes an event listener from an element?

Question 19

Which DOM method is used to create a new HTML element?

Question 20

Which method is used to add a newly created element to the DOM?