Search code examples
emacshtml4

What is the best Emacs mode for HTML 4.01 strict editing?


I have been using nxml-mode to edit XHTML. However, it does not work very well for HTML4 documents whose tags don't have to close. Has anybody found a good Emacs mode for editing these files?

Example document:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-gb">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Test</title>
  </head>
  <body>
  </body>
</html>

Solution

  • I find html-mode works quite well. You might also want to consider html-helper-mode, which has a lot more features than plain html-mode.