Outline updated November 2026
Full-Stack Web Apps with HTMX
Class Duration
21 hours of live training delivered over 3 days.
Student Prerequisites
- Working experience in a backend web programming language (Python, Rust, Go, C#, PHP, etc.)
- HTML and CSS knowledge is helpful but not required
- JavaScript knowledge is needed only for the optional custom scripting topics
Target Audience
Backend and full-stack developers who want interactive web apps without a heavy JavaScript framework, with the UI driven from their existing server-side language. Teams building richer client-side experiences can compare approaches with React Essentials with TypeScript.
Description
This course teaches HTMX, a small library that extends HTML so the server can drive interactive pages. After a review of HTML and CSS, students style pages with Tailwind CSS and its CSS-first configuration. Core modules cover requests, triggers, indicators, targets, swaps, and out-of-band updates. Later modules add custom scripting, caching, security, and extensions, then plan the upgrade to HTMX 4. Students can pair HTMX with Python, C#, JavaScript, Rust, PHP, Go, or Java on the backend.
Learning Outcomes
- Explain how HTMX works with a backend web application.
- Design and build a web application around HTMX.
- Style pages with Tailwind CSS or Bootstrap.
- Send requests and swap content with triggers, targets, and indicators.
- Use out-of-band swaps, synchronization, and CSS transitions.
- Apply boosting, history support, WebSockets, and server-sent events.
- Validate forms and debug with events and logging.
- Configure caching, security, and HTMX settings.
- Add existing HTMX extensions and write custom ones.
- Plan and carry out an upgrade from HTMX 2 to HTMX 4.
Training Materials
All students receive comprehensive courseware covering all topics in the course. Courseware is distributed via GitHub in the form of documentation and extensive code samples.
Software Requirements
Students will need a free, personal GitHub account to access the courseware. Students will need permission to install their backend programming language and Visual Studio Code on their computers. Also, students will need permission to install packages for their backend programming language and Visual Studio Code extensions. If students are unable to configure a local environment, a cloud-based environment can be provided.
Software versions: HTMX 2.x (with HTMX 4 for the upgrade module) and Tailwind CSS 4.
Training Topics
HTMX Overview
- What problem does HTMX solve?
- How HTMX works under the hood
- Setting up HTMX in your web project
- HTMX and the backend web application
Building a Web Application with HTMX
- Choosing a backend framework that supports HTMX
- Designing a web application with HTMX in mind
- Implementing the frontend and backend logic with HTMX
- Testing and deploying the web application
HTML Review (as needed)
- The semantic language of the web
- Structure and content of web pages
- Tag syntax
- Versions and standards
- Common HTML elements
- The
html,head, andbodyelements - Head elements
titlestyleandlinkscriptmetaand others
- Generic tags
divspan
- Common tags
- Semantic tags
- Heading tags
- Paragraphs
- Lists
- Links
- Form tags
formandfieldsetinput,select,textarea, andbutton- Input types
label
- Other tags as needed
CSS Review (as needed)
- The styling language of the web
- Presentation and layout of web pages
- Selector syntax
- Cascade and inheritance rules
Common CSS Properties (as needed)
- Color and background properties
- Font and text properties
- Box model properties
- Display and position properties
- Flexbox and Grid properties
- Responsive design and media queries
- Transitions and animations
Tailwind CSS (or Bootstrap)
- A utility-first CSS framework
- Installing with the Tailwind CLI
- Installing with the Vite plugin
- Prototyping with the Play CDN
- Importing Tailwind with
@import "tailwindcss" - CSS-first configuration with
@theme - Design tokens as theme variables
- Automatic content detection and
@source - Using predefined utility classes
- Custom utilities with
@utility - Custom variants with
@custom-variant - Reusable components with server-side templates
- Extracting styles with
@apply - Optimizing for production
HTMX
- Installing HTMX
- Core principles
- Debugging HTMX apps
HTMX and AJAX
- What is AJAX?
- Connecting to the backend
- Triggers
- Modifiers and filters
- Special events
- Polling and load polling
- Indicators
- Targets
- Swapping
- Synchronization
- CSS transitions
- Out-of-band swaps
- Parameters
- Confirming requests
HTMX Features
- Attribute inheritance
- Boosting
- WebSockets with the
wsextension - Server-sent events with the
sseextension - The browser History API
- CORS for requests and responses
- Form validation
- Animations and CSS transitions
- Events and logging
HTMX Custom Scripting (optional)
- A hypermedia-friendly approach first
- Respecting HATEOAS
- Events between components
- Islands for non-hypermedia components
- Inline scripting
- Embedding inline scripts
- Third-party JavaScript
Additional HTMX Topics
- Caching
- Security
- Configuring HTMX
HTMX Extensions
- What are extensions?
- Core extensions
head-support,idiomorph, andpreloadresponse-targets,sse, andws- Adding more extensions
- Writing custom extensions (optional)
Upgrading to HTMX 4
- The move from XMLHttpRequest to
fetch() - HTMX 2 support and when to upgrade
- Running the upgrade checker
- Explicit inheritance with
:inherited - Error responses swapped by default
- Per-status rules with
hx-status - Renamed and removed attributes
- The
htmx:phase:actionevent names - History restored by server requests
- Request and response header changes
- Built-in morph swaps
- Partial updates with
<hx-partial> hx-actionandhx-method- View transitions
- Configuration changes
- The new default request timeout
- Extension loading changes
- The event-based extension API
- Upgrading incrementally with
htmx-2-compat