Bluefish is a GTK+ HTML editor for the experienced web designer. Its features include nice wizards for startup, tables and frames; a fully featured image insert dialog; thumbnail creation and automatically linking of the thumbnail with the original image; and configurable HTML syntax highlighting.
For Ubuntu users, you can install this app from ‘Ubuntu Software Center‘.
Format HTML code in Bluefish, this function could be found through ‘Tools->Filters->Tidy HTML‘. However, it may not work if tidy is not installed on your system. Try the command:
sudo apt-get install tidy
After tidy installed, you still need to do some kind of configuration. Go to ‘Edit->Preferrences->External Filters->Tidy HTML‘, change the command to ‘|tidy -i|‘. Additionaly, for XML files, you can create one more entry ‘Tidy XML‘ with command ‘tidy -xml -i‘.