htmx lets any HTML element make a request and swap the HTML response into the page. Instead of sending JSON to a JavaScript framework, your server returns fragments of HTML, and the browser does the rest. For many business apps this means far less client-side code, and you keep your templates and logic in the back-end language you already use. This course teaches the hypermedia approach properly, including where it stops being the right tool.

What you'll learn

  • Hypermedia as the engine of application state, explained with working examples
  • Core htmx attributes: hx-get, hx-post, hx-target, hx-swap and hx-trigger
  • Designing server endpoints that return full pages or fragments depending on the request
  • Forms with inline validation, confirmation dialogs and disabled states during requests
  • Patterns: active search, click-to-edit, infinite scroll, lazy loading, modal dialogs and bulk actions
  • History, boosted links and keeping the back button working
  • Out-of-band swaps and response headers for updating several parts of a page at once
  • Live updates with server-sent events and WebSockets extensions
  • Small client-side behaviour with Alpine.js or plain JavaScript, and where it belongs
  • Security: CSRF tokens, escaping, and why returning HTML still needs care

Who it's for

  • Back-end developers using Django, Laravel, Rails, Go or Express who want interactivity without a SPA
  • Teams maintaining server-rendered apps that need a more modern feel
  • Front-end developers curious about a simpler alternative for content- and form-heavy apps

Prerequisites

  • Solid HTML and some JavaScript
  • Experience building server-rendered pages in at least one back-end framework
  • Basic understanding of HTTP methods, status codes and headers

Outcomes

By the end of this course you will be able to:

  1. Build interactive interfaces with htmx and server-rendered HTML.
  2. Structure templates and endpoints so full pages and fragments share the same code.
  3. Use common UI patterns without a client-side framework.
  4. Judge when hypermedia fits and when a component framework is the better choice.

Projects you'll build

  • Contacts manager: list, search, create, edit and delete contacts with inline editing and active search. It practises core attributes, fragments and form handling.
  • Support ticket inbox: a ticket list with filters, infinite scroll, bulk status changes and a detail panel that loads in place. It practises out-of-band swaps, history and bulk actions.
  • Live order board: a kitchen or warehouse board that updates in real time as orders change. It practises server-sent events and partial updates under load.

Examples are shown with Python and FastAPI or Django templates, with notes for Laravel, Go and Express.

Tools you'll use

htmx 2, Alpine.js, a back end of your choice (examples in Python), Jinja or Django templates, browser DevTools, and Playwright for end-to-end tests.

Course outline

ModuleTopic
1Hypermedia, REST and the case for htmx
2Core attributes and your first swap
3Templates, fragments and endpoint design
4Forms and inline validation
5Active search, click-to-edit and modals
6Infinite scroll, lazy loading and bulk actions
7History, boosting and navigation
8Out-of-band swaps and response headers
9Server-sent events and live updates
10Alpine.js and client-side behaviour
11Security, accessibility and testing
12When to choose htmx and when not to

FAQ

Is htmx a replacement for React?

For some apps it is; for others it is not. Highly interactive interfaces such as editors or offline-first apps still suit a component framework like those in React for Beginners. We cover how to tell the difference.

Which back end should I use?

Any that returns HTML. We use Python in examples because it reads clearly, but the course is about patterns that work with every server framework.

Does it work with Laravel?

Yes. Laravel developers may also want to compare it with Laravel Livewire and Filament Admin Panels, which takes a similar server-driven approach inside Laravel.

How do I join?

Get in touch and we'll share the current format, schedule and enrolment details.