<s>
In	O
computing	O
,	O
quirks	B-General_Concept
mode	I-General_Concept
is	O
a	O
technique	O
used	O
by	O
some	O
web	B-Application
browsers	I-Application
for	O
the	O
sake	O
of	O
maintaining	O
backward	B-General_Concept
compatibility	I-General_Concept
with	O
web	O
pages	O
designed	O
for	O
old	O
web	B-Application
browsers	I-Application
instead	O
of	O
strictly	O
complying	O
with	O
W3C	O
and	O
IETF	O
standards	O
in	O
standards	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
This	O
behavior	O
has	O
since	O
been	O
codified	O
in	O
the	O
standard	O
,	O
so	O
what	O
was	O
previously	O
standards	B-General_Concept
mode	I-General_Concept
is	O
now	O
referred	O
to	O
as	O
simply	O
no	O
quirks	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
CSS	B-Language
,	O
a	O
generalized	O
stylesheet	O
language	O
,	O
which	O
specifies	O
how	O
the	O
page	O
should	O
be	O
rendered	O
in	O
various	O
media	O
(	O
visual	O
styles	O
for	O
screen	O
display	O
,	O
print	O
styles	O
to	O
use	O
when	O
printing	O
the	O
page	O
,	O
aural	O
styles	O
to	O
use	O
when	O
the	O
page	O
is	O
read	O
aloud	O
by	O
a	O
screen	O
reader	O
,	O
etc	O
.	O
</s>
<s>
However	O
,	O
most	O
older	O
web	B-Application
browsers	I-Application
either	O
did	O
not	O
fully	O
implement	O
the	O
specifications	O
for	O
these	O
languages	O
or	O
were	O
developed	O
prior	O
to	O
the	O
finalization	O
of	O
the	O
specifications	O
(	O
Microsoft	B-Application
Internet	I-Application
Explorer	I-Application
version	O
5.0	O
for	O
the	O
Macintosh	B-Device
platform	O
,	O
released	O
in	O
2000	O
,	O
was	O
the	O
first	O
major	O
web	B-Application
browser	I-Application
with	O
full	O
support	O
for	O
CSS	B-Language
Level	O
1	O
,	O
for	O
example	O
)	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
many	O
older	O
web	O
pages	O
were	O
constructed	O
to	O
rely	O
upon	O
the	O
older	O
browsers	B-Application
 '	O
incomplete	O
or	O
incorrect	O
implementations	O
,	O
and	O
will	O
only	O
render	O
as	O
intended	O
when	O
handled	O
by	O
such	O
a	O
browser	B-Application
.	O
</s>
<s>
Support	O
for	O
standardized	O
HTML	B-Language
and	O
CSS	B-Language
in	O
major	O
web	B-Application
browsers	I-Application
has	O
increased	O
significantly	O
,	O
but	O
the	O
large	O
body	O
of	O
legacy	B-Device
documents	O
which	O
rely	O
on	O
the	O
quirks	O
of	O
older	O
browsers	B-Application
represents	O
an	O
obstacle	O
for	O
browser	B-Application
developers	O
,	O
who	O
wish	O
to	O
improve	O
their	O
support	O
for	O
standardized	O
HTML	B-Language
and	O
CSS	B-Language
,	O
but	O
also	O
wish	O
to	O
maintain	O
backward	B-General_Concept
compatibility	I-General_Concept
with	O
older	O
,	O
non-standardized	O
pages	O
.	O
</s>
<s>
Additionally	O
,	O
many	O
new	O
web	O
pages	O
continue	O
to	O
be	O
created	O
in	O
the	O
older	O
fashion	O
,	O
since	O
the	O
compatibility	O
workarounds	O
introduced	O
by	O
browser	B-Application
developers	O
mean	O
that	O
an	O
understanding	O
of	O
standardized	O
methods	O
is	O
not	O
strictly	O
necessary	O
.	O
</s>
<s>
To	O
maintain	O
compatibility	O
with	O
the	O
greatest	O
possible	O
number	O
of	O
web	O
pages	O
,	O
modern	O
web	B-Application
browsers	I-Application
are	O
generally	O
developed	O
with	O
multiple	O
rendering	O
modes	O
:	O
in	O
"	O
no	O
quirks	B-General_Concept
mode	I-General_Concept
"	O
pages	O
are	O
rendered	O
according	O
to	O
the	O
HTML	B-Language
and	O
CSS	B-Language
specifications	O
,	O
while	O
in	O
"	O
quirks	B-General_Concept
mode	I-General_Concept
"	O
attempts	O
are	O
made	O
to	O
emulate	O
the	O
behavior	O
of	O
older	O
browsers	B-Application
.	O
</s>
<s>
Some	O
browsers	B-Application
(	O
those	O
based	O
on	O
Mozilla	B-Language
's	O
Gecko	B-Language
rendering	I-Language
engine	I-Language
,	O
or	O
Internet	B-Application
Explorer	I-Application
8	I-Application
in	O
strict	B-General_Concept
mode	I-General_Concept
,	O
for	O
example	O
)	O
also	O
use	O
an	O
"	O
almost	O
standards	O
"	O
mode	O
which	O
attempts	O
to	O
compromise	O
between	O
the	O
two	O
,	O
implementing	O
one	O
quirk	O
for	O
table	O
cell	O
sizing	O
while	O
otherwise	O
conforming	O
to	O
the	O
specifications	O
.	O
</s>
<s>
One	O
prominent	O
difference	O
between	O
quirks	O
and	O
no-quirks	O
modes	O
is	O
the	O
handling	O
of	O
the	O
CSS	B-Language
Internet	B-Application
Explorer	I-Application
box	I-Application
model	I-Application
bug	I-Application
.	O
</s>
<s>
Before	O
version	O
6	O
,	O
Internet	B-Application
Explorer	I-Application
used	O
an	O
algorithm	O
for	O
determining	O
the	O
width	O
of	O
an	O
element	O
's	O
box	O
which	O
conflicted	O
with	O
the	O
algorithm	O
detailed	O
in	O
the	O
CSS	B-Language
specification	O
,	O
and	O
due	O
to	O
Internet	B-Application
Explorer	I-Application
's	O
popularity	O
many	O
pages	O
were	O
created	O
which	O
relied	O
upon	O
this	O
non-standard	O
algorithm	O
.	O
</s>
<s>
As	O
of	O
version	O
6	O
,	O
Internet	B-Application
Explorer	I-Application
uses	O
the	O
CSS	B-Language
specification	O
's	O
algorithm	O
when	O
rendering	O
in	O
no-quirks	O
mode	O
and	O
uses	O
the	O
previous	O
,	O
non-standard	O
algorithm	O
when	O
rendering	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
Another	O
notable	O
difference	O
is	O
the	O
vertical	O
alignment	O
of	O
certain	O
types	O
of	O
inline	O
content	O
;	O
many	O
older	O
browsers	B-Application
aligned	O
images	O
to	O
the	O
bottom	O
border	O
of	O
their	O
containing	O
box	O
,	O
although	O
the	O
CSS	B-Language
specification	O
requires	O
that	O
they	O
be	O
aligned	O
to	O
the	O
baseline	O
of	O
the	O
text	O
within	O
the	O
box	O
.	O
</s>
<s>
In	O
no-quirks	O
mode	O
,	O
Gecko-based	O
browsers	B-Application
will	O
align	O
to	O
the	O
baseline	O
,	O
and	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
they	O
will	O
align	O
to	O
the	O
bottom	O
.	O
</s>
<s>
Additionally	O
,	O
many	O
older	O
browsers	B-Application
did	O
not	O
implement	O
inheritance	O
of	O
font	O
styles	O
within	O
tables	O
;	O
as	O
a	O
result	O
,	O
font	O
styles	O
had	O
to	O
be	O
specified	O
once	O
for	O
the	O
document	O
as	O
a	O
whole	O
,	O
and	O
again	O
for	O
the	O
table	O
,	O
even	O
though	O
the	O
CSS	B-Language
specification	O
requires	O
that	O
font	O
styling	O
be	O
inherited	O
into	O
the	O
table	O
.	O
</s>
<s>
If	O
the	O
font	O
sizes	O
are	O
specified	O
using	O
relative	O
units	O
,	O
a	O
standards-compliant	O
browser	B-Application
would	O
inherit	O
the	O
base	O
font	O
size	O
,	O
then	O
apply	O
the	O
relative	O
font	O
size	O
within	O
the	O
table	O
:	O
for	O
example	O
,	O
a	O
page	O
which	O
declared	O
a	O
base	O
font	O
size	O
of	O
80%	O
and	O
a	O
table	O
font	O
size	O
of	O
80%	O
(	O
to	O
ensure	O
a	O
size	O
of	O
80%	O
in	O
browsers	B-Application
which	O
do	O
not	O
properly	O
inherit	O
font	O
sizes	O
)	O
would	O
,	O
in	O
a	O
standards-compliant	O
browser	B-Application
,	O
display	O
tables	O
with	O
a	O
font	O
size	O
of	O
64%	O
(	O
80%	O
of	O
80%	O
)	O
.	O
</s>
<s>
As	O
a	O
result	O
,	O
browsers	B-Application
typically	O
do	O
not	O
inherit	O
font	O
sizes	O
into	O
tables	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
A	O
third	O
compatibility	O
mode	O
known	O
as	O
"	O
limited	O
quirks	B-General_Concept
mode	I-General_Concept
"	O
(	O
previously	O
,	O
"	O
almost	O
standards	B-General_Concept
mode	I-General_Concept
"	O
or	O
"	O
strict	B-General_Concept
mode	I-General_Concept
"	O
)	O
,	O
which	O
maintains	O
the	O
"	O
traditional	O
"	O
vertical	O
sizing	O
of	O
table	O
cells	O
according	O
to	O
the	O
CSS2	B-Language
specification	O
,	O
has	O
been	O
implemented	O
in	O
these	O
browsers	B-Application
:	O
Safari	B-Application
,	O
Opera	B-Application
7.5	O
(	O
and	O
later	O
)	O
,	O
all	O
Gecko-based	O
browsers	B-Application
since	O
1.0.1	O
(	O
such	O
as	O
Firefox	B-Application
)	O
and	O
Internet	B-Application
Explorer	I-Application
8	I-Application
.	O
</s>
<s>
The	O
layout	O
of	O
images	O
inside	O
table	O
cells	O
is	O
handled	O
the	O
same	O
way	O
"	O
quirks	O
"	O
mode	O
operates	O
,	O
instead	O
,	O
which	O
is	O
fairly	O
consistent	O
with	O
legacy	B-Device
browsers	B-Application
such	O
as	O
Internet	B-Application
Explorer	I-Application
7	I-Application
(	O
and	O
earlier	O
)	O
.	O
</s>
<s>
This	O
means	O
that	O
sliced-images-in-tables	O
layouts	O
are	O
less	O
likely	O
to	O
fall	O
apart	O
in	O
browsers	B-Application
when	O
in	O
either	O
"	O
quirks	O
"	O
or	O
"	O
almost	O
standards	O
"	O
mode	O
,	O
rather	O
than	O
"	O
standards	O
"	O
mode	O
.	O
</s>
<s>
Most	O
often	O
,	O
browsers	B-Application
determine	O
which	O
rendering	O
mode	O
to	O
use	O
based	O
on	O
the	O
presence	O
of	O
a	O
Document	O
Type	O
Declaration	O
in	O
the	O
page	O
;	O
if	O
a	O
full	O
DOCTYPE	O
is	O
present	O
the	O
browser	B-Application
will	O
use	O
no-quirks	O
mode	O
,	O
and	O
if	O
it	O
is	O
absent	O
the	O
browser	B-Application
will	O
use	O
quirks	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
The	O
following	O
DOCTYPE	O
is	O
syntactically	O
invalid	O
,	O
containing	O
the	O
public	O
identifier	O
keyword	O
"	O
PUBLIC	O
"	O
but	O
no	O
public	O
identifier	O
(	O
indicating	O
the	O
name	O
of	O
the	O
version	O
of	O
HTML	B-Language
in	O
use	O
)	O
,	O
and	O
no	O
system	O
identifier	O
URL	O
of	O
an	O
HTML	B-Language
Document	B-Language
Type	I-Language
Definition	I-Language
.	O
</s>
<s>
This	O
would	O
trigger	O
quirks	B-General_Concept
mode	I-General_Concept
:	O
</s>
<s>
Additionally	O
,	O
a	O
web	O
page	O
which	O
does	O
not	O
include	O
a	O
DOCTYPE	O
at	O
all	O
will	O
render	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
One	O
notable	O
exception	O
to	O
this	O
is	O
Microsoft	O
's	O
Internet	B-Application
Explorer	I-Application
6	I-Application
browser	B-Application
,	O
which	O
will	O
render	O
a	O
page	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
if	O
the	O
DOCTYPE	O
is	O
preceded	O
by	O
an	O
XML	B-Protocol
prolog	O
,	O
regardless	O
of	O
whether	O
a	O
full	O
DOCTYPE	O
is	O
specified	O
.	O
</s>
<s>
Thus	O
an	O
XHTML	B-Language
page	O
which	O
begins	O
with	O
the	O
following	O
code	O
would	O
be	O
rendered	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
by	O
IE	B-Application
6	I-Application
:	O
</s>
<s>
The	O
above	O
is	O
useful	O
to	O
an	O
extent	O
as	O
it	O
can	O
be	O
used	O
to	O
trigger	O
quirks	B-General_Concept
mode	I-General_Concept
only	O
in	O
IE	B-Application
6	I-Application
.	O
</s>
<s>
Quirks	B-General_Concept
mode	I-General_Concept
in	O
any	O
version	O
of	O
IE	O
will	O
also	O
be	O
triggered	O
if	O
anything	O
precedes	O
the	O
DOCTYPE	O
.	O
</s>
<s>
For	O
example	O
,	O
if	O
a	O
hypertext	O
document	O
contains	O
a	O
comment	O
,	O
space	O
or	O
any	O
tag	O
before	O
the	O
DOCTYPE	O
declaration	O
,	O
IE	O
will	O
use	O
quirks	B-General_Concept
mode	I-General_Concept
:	O
</s>
<s>
The	O
problem	O
with	O
the	O
XML	B-Protocol
declaration	O
was	O
fixed	O
in	O
version	O
7	O
of	O
Internet	B-Application
Explorer	I-Application
,	O
in	O
which	O
the	O
XML	B-Protocol
prolog	O
is	O
simply	O
ignored	O
.	O
</s>
<s>
However	O
,	O
for	O
maximum	O
compatibility	O
with	O
existing	O
and	O
older	O
web	B-Application
browsers	I-Application
,	O
the	O
World	O
Wide	O
Web	O
Consortium	O
,	O
which	O
maintains	O
the	O
XHTML	B-Language
specification	O
,	O
suggests	O
that	O
authors	O
of	O
XHTML	B-Language
documents	O
could	O
consider	O
omitting	O
the	O
XML	B-Protocol
declaration	O
.	O
</s>
<s>
Henri	O
Sivonen	O
compiled	O
a	O
list	O
of	O
various	O
document	O
types	O
and	O
how	O
they	O
are	O
treated	O
in	O
the	O
most	O
common	O
browsers	B-Application
,	O
showing	O
whether	O
pages	O
are	O
rendered	O
in	O
Quirks	O
,	O
Standards	O
,	O
or	O
Almost	O
standards	B-General_Concept
mode	I-General_Concept
.	O
</s>
<s>
The	O
criterion	O
used	O
for	O
"	O
Almost	O
standards	B-General_Concept
mode	I-General_Concept
"	O
is	O
non-standard	O
table	O
cell	O
height	O
rendering	O
.	O
</s>
<s>
This	O
table	O
applies	O
to	O
content	O
served	O
with	O
the	O
Content-Type	B-Application
text/html	B-Language
.	O
</s>
<s>
Content	O
served	O
with	O
the	O
Content-Type	B-Application
application/xhtml	O
+xml	O
is	O
rendered	O
in	O
Standards	B-General_Concept
mode	I-General_Concept
in	O
Chrome	B-Application
,	O
Firefox	B-Application
,	O
Internet	B-Application
Explorer	I-Application
9	O
,	O
Safari	B-Application
,	O
and	O
Opera	B-Application
.	O
</s>
<s>
Internet	B-Application
Explorer	I-Application
6	I-Application
,	O
7	O
,	O
and	O
8	O
do	O
not	O
support	O
Content-Type	B-Application
application/xhtml	O
+xml	O
.	O
</s>
<s>
In	O
most	O
browsers	B-Application
,	O
the	O
Document	B-General_Concept
Object	I-General_Concept
Model	I-General_Concept
extension	O
indicates	O
the	O
rendering	O
mode	O
for	O
the	O
current	O
page	O
.	O
</s>
<s>
In	O
standards	B-General_Concept
mode	I-General_Concept
and	O
almost-standards	O
mode	O
,	O
contains	O
the	O
value	O
"	O
CSS1Compat	O
"	O
,	O
while	O
in	O
quirks	B-General_Concept
mode	I-General_Concept
it	O
equals	O
"	O
BackCompat	O
"	O
.	O
</s>
<s>
Additionally	O
,	O
in	O
Mozilla	B-Application
Firefox	I-Application
and	O
Opera	B-Application
the	O
rendering	O
mode	O
in	O
use	O
for	O
a	O
given	O
page	O
is	O
indicated	O
on	O
the	O
'	O
Page	O
info	O
 '	O
informational	O
box	O
.	O
</s>
