Home » HTML » Html miscellaneous » Question
  1. Which method is not used for traversing DOM tree?
    1. after()
    2. parents()
    3. parentsUntil()
    4. parent()
    5. None of these
Correct Option: A

There are three methods for the traversal of DOM tree. Parent(), parentsUntil(), parents(). Direct parent element is returned by parent() method. All the ancestor elements are returned by parents() method. All the ancestor elements that are between given two arguments are returned by parentsUntil() method.



Your comments will be displayed only after manual approval.