HTML editing in emacs

I’m an emacs user since 2000, but I actually never really had to mess with HTML a lot, as I never did real web development (that’s unusual nowadays, isn’t it ?), until recently.

Here is the history of what I have used so far :

  • built-in html-mode: not really helpful
  • sgml-mode: better, but indentation and some HTML-only syntax are not well formated. But still a valid choice
  • sgml-mode + mmm-mode : I used that for Mason development. It did the trick pretty well.
  • nxml-mode: a very good mode, which is more XML oriented. The problem is that by default it tries to validate HTML, and its indentation is not working great by deafult (at least for me). However it’s probably the best thing around if you need to edit XML within emacs

Slanning just told me he uses html-helper-mode. I tried it, and it seems to be what I need : a lightweight HTML mode with syntax highlighting and indentation working from scratch. Coupled with mmm-mode, it’s probably the best way of editing HTML, JSP, Mason, etc.