Comparison of layout engines (HTML)

The following tables compare HTML compatibility and support for a number of layout engines. Please see the individual products' articles for further information. This article is not all-inclusive or necessarily up-to-date. Unless otherwise specified in footnotes, comparisons are based on The Stable versions without any add-ons, extensions or external programs.

Only HTML 4 and XHTML 1 served as text/html (so called "HTML compatible" XHTML) are considered. XHTML 2 is not considered as it is a Redefinition of XHTML, which is not backward compatible. For more XHTML-related comparisons, please refer to comparison of layout engines (XHTML).

Version number, if possible, is provided for feature that is fully supported (based on HTML 4.01). Proprietary extensions are not included.

Engine nomenclature

Layout Engine

Used By

Trident

Internet Explorer

Tasman

Internet Explorer for Mac

Gecko

All Mozilla software, including Firefox; GNOME's Galeon

WebCore

Mac OS X (Safari)

KHTML

KDE

Presto

Opera

iCab

iCab

DOCTYPE sniffing

The way that the engines determine standards mode, quirks mode, or almost standards mode.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

colspan="9" | XHTML 1.1

Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

?

?

colspan="9" | XHTML 1.0

Strict

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

?

Transitional

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

?

Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">

?

?

colspan="10" | HTML 4.01

Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">

?

Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">

?

?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">

?

?

colspan="10" | HTML 4.0

Strict

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">

Transitional

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">

?

?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

?

?

Frameset

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN" "http://www.w3.org/TR/REC-html40/frameset.dtd">

?

?

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN">

?

?

General DOCTYPE sniffing notes

  1. Quirks mode — Emulates non-standard behaviors in Navigator 4 and MSIE. Generally used in HTML without DOCTYPE and HTML 3 or below. The amount of emulation differs between the layout engines, e.g. Gecko and Presto use the standardized W3C box layout model even in quirks mode. Thus the results are quite unpredictable in this mode.
  2. Standards mode — Follows W3C's recommendations.

Gecko DOCTYPE sniffing notes

  1. Almost standards mode — Implements the vertical sizing of table cells traditionally and not rigorously according to the CSS2 specification. Almost standards mode was created after 1.0 and 1.1alpha, but before 1.0.1 and 1.1beta. This mode is, however, similar to the standard modes of Trident, Presto and WebCore. Before almost standards mode was created these DOCTYPEs triggered standards mode.

Global structure elements

The global structure of the document.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Basic structure

html

head

body

colspan="8" | Metadata

title

meta

colspan="8" | Headings

h1

h2

h3

h4

h5

h6

colspan="8" | Grouping elements

div

span

Text elements

Elements that represent text.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Phrase

em

strong

dfn

code

samp

kbd

var

cite

abbr

acronym

colspan="8" | Quotations

blockquote

q

colspan="8" | Subscripts and superscripts

sub

sup

colspan="8" | Lines and paragraphs

p

pre

br

colspan="8" | Marking document changes

ins

del

Gecko text element notes

  1. q — Does not support nested quotes prior to 1.8 1.

List elements

Elements that represent lists of information.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Unordered and ordered lists

ul

ol

li

colspan="8" | Definition lists

dl

dt

dd

Table elements

Elements that represent tabular information.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Basic table elements

table

caption

tr

th

td

colspan="8" | Row groups

thead

tfoot

?

tbody

colspan="8" | Column groups

colgroup

?

col

?

Hyperlinks, one of The Primary forces driving the success of the World Wide Web.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

a

link

base

Multimedia elements

Multimedia features including images, applets , video clips, and other HTML documents.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Images

img

colspan="8" | Generic inclusion

object

param

colspan="8" | Image maps

map

area

colspan="8" | Deprecated

applet

Trident multimedia element notes

  1. object — For images, a frame will be added to the object. Other content types are not supported and the element is incorrectly implemented as an ActiveX wrapper. Nested objects fallback mechanism is not supported prior to version 7. 2 3

Frame elements

Elements to present documents in multiple views, which may be independent windows or subwindows. Frame layout is only available in the frameset profiles. All frames are not available in XHTML 1.1 (use generic object elements instead for inline frames).

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Frame layout

frameset

frame

noframes

colspan="8" | Inline frames

iframe

Form elements

The user interface controls for interacting with the web server.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Basic structure

form

fieldset

legend

colspan="8" | Form controls and labels

input

textarea

button

label

colspan="8" | List boxes (combo boxes)

select

optgroup

option

KHTML form elements notes

  1. label — Label is focusable prior to 3.4.2.

Trident form elements notes

  1. button — Button's value attribute is not supported. Button's innerHTML/CDATA is returned instead.

Presentational elements

Elements that specify presentational information. Although not all elements are deprecated, their use is discouraged in favor of stylesheets. Deprecated elements are not available in the strict profiles and XHTML 1.1.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Font styles

b

i

big

small

tt

colspan="8" | Horizontal rules

hr

colspan="8" | Deprecated

u

s

strike

Stylesheet elements

The ways to apply stylesheets (CSS) to the document.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

Using link element

style

Script elements

Elements for embedding client-side script (JavaScript). See also DOM Events for a list of attributes used to attach an event handler to an element.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

script

Language elements

Elements related to language information.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

bdo

?

?

KHTML language element notes

  1. bdo — While alphabetic and alphanumeric words are affected, numeric (numbers only) words are not.

Generic attributes

Attributes that can be used in any elements.

Trident

Tasman

Gecko

WebCore

KHTML

Presto

iCab

colspan="8" | Element identifiers

id

class

colspan="8" | Inline styles

style

colspan="8" | Advisory information

title

colspan="8" | Language information

lang

dir