Web Technology
Accenture Technical 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

Quick AnswerThe correct answer is True because it directly addresses the core logic of Web Technology.

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

PrimerPrep has 1400+ practice questions, 2026 simulations and coding hands-on — all free.

Watch Walkthroughs!