Link Search Menu Expand Document

Linux HTML Widgets Cheat Sheet

When you start a new open source project and decide to provide parts or the whole UI by an HTML widget you face the problem of first finding HTML widget libraries, especially light weight ones, and then using the correct one to avoid throwing away the code at a later point when you find one important feature missing.

With this blog post I try to give a summary of existing open source HTML renderer libraries in the Linux world. I have some background experiences with the libraries from working on Liferea where we started with GtkHTML2, later added GtkMozembed support, then added Webkit support and finally switched to WebKit-only rendering.

The following table tries to summarize the simple availability of the different HTML renderers:

NameToolkitPlatformDerived FromDriving ForceActive
KHTMLQT%KDEKDEYes</tr>
wxHtml</td>wxWidgetsGTK, WindowsKHTMLwxWidgetsYes</tr>
GtkHtmlGTK+ 1.0GNOME 1KHTMLGNOME 1No, long gone
GtkHtml2GTK+ 2.0GNOME 2GtkHtmlGNOME 2No, v2.11: Aug 2007
GtkHtml3GTK+ 2.0GNOME 2GtkHtmlXimian, EvolutionNo, v3.14: May 2008
GtkMozEmbedGTK+ 2.0Gecko%MozillaSomewhat
WebKitGtkGTK+ 2.0
GTK+ 3.0
WebkitKHTMLApple SafariYes </table> Note: My summary somewhat complements this Wikipedia list. Still it focusses more on Linux renderers and does correctly distinguish between the rather mad history of GtkHtml*. Given the list above one could conclude the only acceptable renderers are KTHML, wxHtml and WebkitGtk simply based on project activity. Still other renderers like GtkHtml2 and GtkHtml3 have gone a long way and provide a limited but stable functionality. But the important question is: What features are supported by the different renderers?
NameWidget
Embed</td>
Full
HTML</td>
CSSJSJava/FlashEditor </tr>
KHTMLyy1,2,3yyn
wxHtmlynnonennn
GtkHtmlyynonenny
GtkHtml2yy1,2 inlinennn
GtkHtml3yynonenny
GtkMozEmbedny1,2,3yyn
WebKitGtkny1,2,3yyn </tr> </table> The feature matrix along with the platform listing explains why a lot of those old renderer libraries are still around. Given you want to render simple markup in an email client you might still choose wxHtml or GtkHtml3, with the latter one providing you with a HTML editor for rich mail editing. Of course when you want to allow your users to have fully fledged inline browsing you need to use either KTHML, GtkMozEmbed or Webkit. Currently I believe WebKitGtk to be the best choice as it's widget gets a lot of attention, which GtkMozEmbed never had while being unstable and rather limited at the same time. If you find mistakes or have something to add please post a comment!