Join MDN and developers like you at Mozilla's View Source conference, 12-14 September in Berlin, Germany. Learn more at


The ancestor axis indicates all the ancestors of the context node beginning with the parent node and traveling through to the root node.

Document Tags and Contributors

 Contributors to this page: CitizenK
 Last updated by: CitizenK,