Emacs: Xah HTML Mode 📦

By Xah Lee. Date: . Last updated: .

xah-html-mode.el is a emacs major mode for HTML.

xah thanks rine 2023-03-23 HhBZ9
xah thanks rine 2023-03-23

Get it by Donation

Goto paypal.com, send $32 to Xah@XahLee.org (be sure to include your correct email address. I need that to send it to you.)

Write in message area: xah html mode

Manual Install

Put the file xah-html-mode.el in ~/.emacs.d/lisp/

Put all dependent files in that dir. (included)

Put this in your Emacs Init File:

(add-to-list 'load-path "~/.emacs.d/lisp/")
(require 'xah-html-mode)


Xah HTML Mode is more advanced than the several HTML modes bundled in GNU Emacs or online.

Visual Validation

xah html mode demo 2021-09-18 wphk
xah html mode, visual validation.

Syntax coloring based on visual code validation. The colors tells you if you have the correct syntax. Including, invalid/typo tag names, attribute names, or missing angle brackets.

xah html mode demo 2021-09-18 xK27
xah html mode demo 2021-09-18 xK27

Tag Insertion

Besides a generic command to insert tag, there are also commands dedicated to special tags:

Tag Navigation

Tag Manipulation

Most Efficient Key System

Validate HTML/XML

Commands to validate HTML/XML by buffer, file, or whole directory. Based on XML well-formed concept via syntax. Validate 5 thousand HTML files in few seconds.

Fully Documented

Every command has full documentation.

Support for Embeded Programing Language Source Code

Full featured support of embeded programing language source code, similar to org mode's babel feature.

HTML Tutorial

Video Tutorial