tags:

views:

395

answers:

3

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"&gt;
<html lang="en-gb">
  <head>
    <meta http-equiv="Content-type" content="text/html; charset=utf-8">
    <title>Test</title>
  </head>
  <body>
  </body>
</html>
+2  A: 

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.

asciiphil
A: 

I used html-helper-mode for awhile, but switched back to html-mode because the indenting in html-helper-mode was acting funny and I didn't have the time to troubleshoot it. So my vote is for html-mode as well.

artlogic
A: 

You can also try nxml-mode or nxhtml-mode : http://www.emacswiki.org/emacs/NxmlMode

fredz