• Skip to main content
  • Skip to search
  • Skip to select language
  • References
    • Overview / Web Technology

      Web technology reference for developers

    • HTML

      Structure of content on the web

    • CSS

      Code used to describe document style

    • JavaScript

      General-purpose scripting language

    • HTTP

      Protocol for transmitting web resources

    • Web APIs

      Interfaces for building web applications

    • Web Technology

      Web technology reference for developers

  • Guides
    • Overview / MDN Learning Area

      Learn web development

    • MDN Learning Area

      Learn web development

    • HTML

      Learn to structure web content with HTML

    • CSS

      Learn to style content using CSS

    • JavaScript

      Learn to run scripts in the browser

    • Accessibility

      Learn to make the web accessible to all

  • MDN Plus
    • Overview

      More MDN. Your MDN.

    • FAQ

      Frequently asked questions about MDN Plus

  • Already a subscriber?
  • Get MDN Plus
  1. References
  2. XPath
  3. Axes
  4. child

In this article

  • Specifications

Related Topics

  1. Axes
    1. Axes
    2. ancestor
    3. ancestor-or-self
    4. attribute
    5. child
    6. descendant
    7. descendant-or-self
    8. following
    9. following-sibling
    10. namespace
    11. parent
    12. preceding
    13. preceding-sibling
    14. self
  2. Comparison of CSS Selectors and XPath
  3. Functions
    1. Functions
    2. boolean
    3. ceiling
    4. choose
    5. concat
    6. contains
    7. count
    8. current
    9. document
    10. element-available
    11. false
    12. floor
    13. format-number
    14. function-available
    15. generate-id
    16. id
    17. key
    18. lang
    19. last
    20. local-name
    21. name
    22. namespace-uri
    23. normalize-space
    24. not
    25. number
    26. position
    27. round
    28. starts-with
    29. string
    30. string-length
    31. substring
    32. substring-after
    33. substring-before
    34. sum
    35. system-property
    36. translate
    37. true
    38. unparsed-entity-url
  4. Introduction to using XPath in JavaScript
  5. XPath snippets

In this article

  • Specifications

child

The child axis indicates the children of the context node. If an XPath expression does not specify an axis, the child axis is understood by default. Since only the root node or element nodes have children, any other use will select nothing.

Specifications

Specification
XPath3.1
# axes

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: May 14, 2022, by MDN contributors

Your blueprint for a better internet.

  • MDN on Twitter
  • MDN on GitHub

MDN

  • About
  • Hacks Blog
  • Careers

Support

  • Product help
  • Report a page issue
  • Report a site issue

Our communities

  • MDN Community
  • MDN Forum
  • MDN Chat

Developers

  • Web Technologies
  • Learn Web Development
  • MDN Plus
  • Website Privacy Notice
  • Cookies
  • Legal
  • Community Participation Guidelines

Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2022 by individual mozilla.org contributors. Content available under a Creative Commons license.