Web Technology
Accenture PrimereasyWeb TechnologyJquery

Kiran wants to remove all the child nodes from the given div element. Help him to select the correct option to remove all the child node from the div element. <body> <div> This is some text <h2>Good morning</h2> <p>This is a paragraph inside the div.</p> </div> <p>This is a paragraph outside the div.</p> </body>

Answer options

A
True
B
False

Correct answer: True

Explanation

jQuery's .empty() method removes all child nodes and content from the selected element while keeping the element itself. Use .remove() to delete the element and its children entirely.

Related Accenture Web Technology questions

Practice more Accenture Web Technology questions

PrimerDumps has 1400+ primer questions, 2026 mocks and coding hands-on — all free.