<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cat facts</title>
<script src="https://unpkg.com/htmx.org@1.8.4"></script>
</head>
<body>
<div id="catfact"></div>
<button hx-get="https://catfact.ninja/fact" hx-swap="innerHTML" hx-target="#catfact">
Get a random fact about cats
</button>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.