https://htmx.org/attributes/hx-target/
You can also use Out of Band swaps to replace arbitrary DOM content:
https://htmx.org/docs/#oob_swaps