--- layout: layout.njk title: > htmx - hx-disinherit --- ## `hx-disinherit` The default behavior for htmx is to "inherit" many attributes automatically: that is, an attribute such as [hx-target](/attributes/hx-target) may be placed on a parent element, and all child elements will inherit that target. The `hx-disinherit` attribute allows you to control this automatic attribute inheritance. An example scenario is to allow you to place an `hx-boost` on the `body` element of a page, but overriding that behavior in a specific part of the page to allow for more specific behaviors. htmx evaluates attribute inheritance as follows: * when `hx-disinherit` is set on a parent node * `hx-disinherit="*"` all attribute inheritance for this element will be disabled * `hx-disinherit="hx-select hx-get hx-target"` disable inheritance for only one or multiple specified attributes ```html
``` ```html