HTMX lets HTML attributes trigger requests and place returned HTML into the page, reducing the need for conventional client-side application code. section 11.2
Load server-rendered greetings
A button can request /hello-world?name=SSR and insert the response into #greetings: <button hx-get="/hello-world?name=SSR" hx-target="#greetings" type="button">hello-world SSR</button>. The server returns HTML containing rendered custom elements, which HTMX places in the target. section 11.2
Listing 11.4 public/index.html
<!doctype html>
<html lang="en">
<head>
<title>Vanilla Web Component SSR</title>
<script src="https://unpkg.com/htmx.org@2.0.8"></script>
</head>
<body>
<button
hx-get="/hello-world?name=SSR"
hx-target="#greetings"
type="button"
>
hello-world SSR
</button>
<div id="greetings"></div>
</body>
</html>
Inspect the complete page markup, including the HTMX 2.0.8 script, request attributes, and target element. section 11.2


