Emacs HTML history
This page is some outdated info on html modes in emacs. There are written mosly from 2006 to 2015, describing emacs html mode during those times.
For latest, see Emacs, Working with HTML
Which HTML Mode To Use?
Pure HTML4 Source File
html-mode is the default html mode for emacs 25 (year ~2017) and before.
html-mode is a basic HTML mode.
It works with pure HTML4 code only.
It supports only HTML4 tags or before. (that's HTML in the 2000s and before)
Its parent mode is
both are writen by SGML/XML expert James Clark, in 1990s.
Emacs: Xah HTML Mode
This is what i use to write blogs and my websites.
XML and XHTML
nxml-mode is a mode for editing valid XML documents, including xhtml.
nxml-mode is bundled with emacs 23.1.1,
[see Emacs 23.1 Features (released 2009-07)]
nxml-mode is not the default mode loaded when you open a file ending in “.xml”. (This is fixed in 23.2.x)
To set emacs to always use nxml when files ending in “.xml” is opened, see:
Emacs: Set Default Major Mode
nxml-mode is written by SGML/XML expert James Clark, in 2000s. It has the feature of real-time XML validation.
- web-mode http://web-mode.org/ is new, becoming popular around 2012. You might try it. Install it from MELPA. [see Emacs: Install Package with ELPA/MELPA]
- html-helper-mode [http://www.emacswiki.org/cgi-bin/wiki/HtmlHelperMode ]
- nXhtml mode [http://www.emacswiki.org/emacs/NxhtmlMode ]. (nXhtml mode is based on nxml mode, but as of mid 2009, i did not find this package robust.)