---
title: ancestor-or-self
slug: Web/XPath/Axes/ancestor-or-self
tags:
  - Axe
  - XPath
---
The `ancestor-or-self` axis indicates the context node and all of its ancestors, including the root node.
