<s>
Cascading	B-Language
Style	I-Language
Sheets	I-Language
(	O
CSS	B-Language
)	O
is	O
a	O
style	B-Language
sheet	I-Language
language	I-Language
used	O
for	O
describing	O
the	O
presentation	B-General_Concept
of	O
a	O
document	O
written	O
in	O
a	O
markup	O
language	O
such	O
as	O
HTML	B-Language
or	O
XML	B-Protocol
(	O
including	O
XML	B-Protocol
dialects	O
such	O
as	O
SVG	B-Application
,	O
MathML	B-Language
or	O
XHTML	B-Language
)	O
.	O
</s>
<s>
CSS	B-Language
is	O
a	O
cornerstone	O
technology	O
of	O
the	O
World	O
Wide	O
Web	O
,	O
alongside	O
HTML	B-Language
and	O
JavaScript	B-Language
.	O
</s>
<s>
CSS	B-Language
is	O
designed	O
to	O
enable	O
the	O
separation	O
of	O
content	O
and	O
presentation	B-General_Concept
,	O
including	O
layout	O
,	O
colors	O
,	O
and	O
fonts	O
.	O
</s>
<s>
This	O
separation	O
can	O
improve	O
content	O
accessibility	O
;	O
provide	O
more	O
flexibility	O
and	O
control	O
in	O
the	O
specification	O
of	O
presentation	B-General_Concept
characteristics	O
;	O
enable	O
multiple	O
web	O
pages	O
to	O
share	O
formatting	O
by	O
specifying	O
the	O
relevant	O
CSS	B-Language
in	O
a	O
separate	O
.css	B-Language
file	O
,	O
which	O
reduces	O
complexity	O
and	O
repetition	O
in	O
the	O
structural	O
content	O
;	O
and	O
enable	O
the	O
.css	B-Language
file	O
to	O
be	O
cached	B-General_Concept
to	O
improve	O
the	O
page	O
load	O
speed	O
between	O
the	O
pages	O
that	O
share	O
the	O
file	O
and	O
its	O
formatting	O
.	O
</s>
<s>
Separation	O
of	O
formatting	O
and	O
content	O
also	O
makes	O
it	O
feasible	O
to	O
present	O
the	O
same	O
markup	O
page	O
in	O
different	O
styles	O
for	O
different	O
rendering	O
methods	O
,	O
such	O
as	O
on-screen	O
,	O
in	O
print	O
,	O
by	O
voice	O
(	O
via	O
speech-based	O
browser	B-Application
or	O
screen	O
reader	O
)	O
,	O
and	O
on	O
Braille-based	O
tactile	O
devices	O
.	O
</s>
<s>
CSS	B-Language
also	O
has	O
rules	O
for	O
alternate	O
formatting	O
if	O
the	O
content	O
is	O
accessed	O
on	O
a	O
mobile	B-Application
device	I-Application
.	O
</s>
<s>
The	O
CSS	B-Language
specifications	O
are	O
maintained	O
by	O
the	O
World	O
Wide	O
Web	O
Consortium	O
(	O
W3C	O
)	O
.	O
</s>
<s>
Internet	B-Application
media	I-Application
type	I-Application
(	O
MIME	B-Application
type	I-Application
)	O
text/css	B-Language
is	O
registered	O
for	O
use	O
with	O
CSS	B-Language
by	O
RFC	O
2318	O
(	O
March	O
1998	O
)	O
.	O
</s>
<s>
The	O
W3C	O
operates	O
a	O
free	O
CSS	B-Language
validation	O
service	O
for	O
CSS	B-Language
documents	O
.	O
</s>
<s>
In	O
addition	O
to	O
HTML	B-Language
,	O
other	O
markup	O
languages	O
support	O
the	O
use	O
of	O
CSS	B-Language
including	O
XHTML	B-Language
,	O
plain	B-Language
XML	I-Language
,	O
SVG	B-Application
,	O
and	O
XUL	B-Application
.	O
</s>
<s>
CSS	B-Language
is	O
also	O
used	O
in	O
GTK	B-Application
widget	B-Library
toolkit	I-Library
.	O
</s>
<s>
CSS	B-Language
has	O
a	O
simple	O
syntax	B-Application
and	O
uses	O
a	O
number	O
of	O
English	O
keywords	O
to	O
specify	O
the	O
names	O
of	O
various	O
style	O
properties	O
.	O
</s>
<s>
In	O
CSS	B-Language
,	O
selectors	O
declare	O
which	O
part	O
of	O
the	O
markup	O
a	O
style	O
applies	O
to	O
by	O
matching	O
tags	B-General_Concept
and	O
attributes	O
in	O
the	O
markup	O
itself	O
.	O
</s>
<s>
all	O
elements	B-General_Concept
of	O
a	O
specific	O
type	O
,	O
e.g.	O
</s>
<s>
elements	B-General_Concept
specified	O
by	O
attribute	B-General_Concept
,	O
in	O
particular	O
:	O
</s>
<s>
class	O
:	O
an	O
identifier	O
that	O
can	O
annotate	O
multiple	O
elements	B-General_Concept
in	O
a	O
document	O
,	O
denoted	O
by	O
a	O
dot	O
prefix	O
e.g.	O
</s>
<s>
elements	B-General_Concept
depending	O
on	O
how	O
they	O
are	O
placed	O
relative	O
to	O
others	O
in	O
the	O
document	B-General_Concept
tree	I-General_Concept
.	O
</s>
<s>
Pseudo-classes	O
are	O
used	O
in	O
CSS	B-Language
selectors	O
to	O
permit	O
formatting	O
based	O
on	O
information	O
that	O
is	O
not	O
contained	O
in	O
the	O
document	B-General_Concept
tree	I-General_Concept
.	O
</s>
<s>
One	O
example	O
of	O
a	O
widely	O
used	O
pseudo-class	B-Language
is	O
,	O
which	O
identifies	O
content	O
only	O
when	O
the	O
user	O
"	O
points	O
to	O
"	O
the	O
visible	O
element	O
,	O
usually	O
by	O
holding	O
the	O
mouse	O
cursor	O
over	O
it	O
.	O
</s>
<s>
A	O
pseudo-class	B-Language
classifies	O
document	O
elements	B-General_Concept
,	O
such	O
as	O
or	O
,	O
whereas	O
a	O
pseudo-element	B-Language
makes	O
a	O
selection	O
that	O
may	O
consist	O
of	O
partial	O
elements	B-General_Concept
,	O
such	O
as	O
or	O
.	O
</s>
<s>
Note	O
the	O
double-colon	O
notation	O
for	O
pseudo-elements	B-Language
versus	O
single-colon	O
notation	O
for	O
pseudo-class	B-Language
.	O
</s>
<s>
Multiple	O
selectors	O
may	O
be	O
joined	O
in	O
a	O
spaced	O
list	O
to	O
specify	O
elements	B-General_Concept
by	O
location	O
,	O
element	O
type	O
,	O
id	O
,	O
class	O
,	O
or	O
any	O
combination	O
thereof	O
.	O
</s>
<s>
For	O
example	O
,	O
applies	O
to	O
all	O
elements	B-General_Concept
of	O
class	O
myClass	O
that	O
are	O
inside	O
div	O
elements	B-General_Concept
,	O
whereas	O
applies	O
to	O
all	O
div	O
elements	B-General_Concept
that	O
are	O
inside	O
elements	B-General_Concept
of	O
class	O
myClass	O
.	O
</s>
<s>
This	O
is	O
not	O
to	O
be	O
confused	O
with	O
concatenated	O
identifiers	O
such	O
as	O
which	O
applies	O
to	O
div	O
elements	B-General_Concept
of	O
class	O
myClass	O
.	O
</s>
<s>
The	O
following	O
table	O
provides	O
a	O
summary	O
of	O
selector	O
syntax	B-Application
indicating	O
usage	O
and	O
the	O
version	O
of	O
CSS	B-Language
that	O
introduced	O
it	O
.	O
</s>
<s>
Properties	O
are	O
specified	O
in	O
the	O
CSS	B-Language
standard	O
.	O
</s>
<s>
Some	O
properties	O
can	O
affect	O
any	O
type	O
of	O
element	O
,	O
and	O
others	O
apply	O
only	O
to	O
particular	O
groups	O
of	O
elements	B-General_Concept
.	O
</s>
<s>
Values	O
may	O
be	O
keywords	O
,	O
such	O
as	O
"	O
center	O
"	O
or	O
"	O
inherit	O
"	O
,	O
or	O
numerical	O
values	O
,	O
such	O
as	O
(	O
200	O
pixels	B-Algorithm
)	O
,	O
(	O
50	O
percent	O
of	O
the	O
viewport	O
width	O
)	O
or	O
(	O
80	O
percent	O
of	O
the	O
parent	O
element	O
's	O
width	O
)	O
.	O
</s>
<s>
Some	O
units	O
–	O
cm	O
(	O
centimetre	O
)	O
;	O
in	O
(	O
inch	O
)	O
;	O
mm	O
(	O
millimetre	O
)	O
;	O
pc	O
(	O
pica	O
)	O
;	O
and	O
pt	O
(	O
point	O
)	O
–	O
are	O
absolute	O
,	O
which	O
means	O
that	O
the	O
rendered	O
dimension	O
does	O
not	O
depend	O
upon	O
the	O
structure	O
of	O
the	O
page	O
;	O
others	O
–	O
em	O
(	O
em	O
)	O
;	O
ex	O
(	O
ex	O
)	O
and	O
px	O
(	O
pixel	B-Algorithm
)	O
–	O
are	O
relative	O
,	O
which	O
means	O
that	O
factors	O
such	O
as	O
the	O
font	O
size	O
of	O
a	O
parent	O
element	O
can	O
affect	O
the	O
rendered	O
measurement	O
.	O
</s>
<s>
These	O
eight	O
units	O
were	O
a	O
feature	O
of	O
CSS	B-Language
1	O
and	O
retained	O
in	O
all	O
subsequent	O
revisions	O
.	O
</s>
<s>
The	O
proposed	O
CSS	B-Language
Values	O
and	O
Units	O
Module	O
Level	O
3	O
will	O
,	O
if	O
adopted	O
as	O
a	O
W3C	O
Recommendation	O
,	O
provide	O
seven	O
further	O
length	O
units	O
:	O
ch	O
;	O
Q	O
;	O
rem	O
;	O
vh	O
;	O
vmax	O
;	O
vmin	O
;	O
and	O
vw	O
.	O
</s>
<s>
Before	O
CSS	B-Language
,	O
nearly	O
all	O
presentational	O
attributes	O
of	O
HTML	B-Language
documents	I-Language
were	O
contained	O
within	O
the	O
HTML	B-General_Concept
markup	I-General_Concept
.	O
</s>
<s>
All	O
font	O
colors	O
,	O
background	O
styles	O
,	O
element	O
alignments	O
,	O
borders	O
,	O
and	O
sizes	O
had	O
to	O
be	O
explicitly	O
described	O
,	O
often	O
repeatedly	O
,	O
within	O
the	O
HTML	B-Language
.	O
</s>
<s>
CSS	B-Language
lets	O
authors	O
move	O
much	O
of	O
that	O
information	O
to	O
another	O
file	O
,	O
the	O
style	O
sheet	O
,	O
resulting	O
in	O
considerably	O
simpler	O
HTML	B-Language
.	O
</s>
<s>
For	O
example	O
,	O
headings	O
(	O
h1	O
elements	B-General_Concept
)	O
,	O
sub-headings	O
(	O
h2	O
)	O
,	O
sub-sub-headings	O
(	O
h3	O
)	O
,	O
etc.	O
,	O
are	O
defined	O
structurally	O
using	O
HTML	B-Language
.	O
</s>
<s>
In	O
print	O
and	O
on	O
the	O
screen	O
,	O
choice	O
of	O
font	O
,	O
size	O
,	O
color	O
and	O
emphasis	O
for	O
these	O
elements	B-General_Concept
is	O
presentational	O
.	O
</s>
<s>
Before	O
CSS	B-Language
,	O
document	O
authors	O
who	O
wanted	O
to	O
assign	O
such	O
typographic	B-Application
characteristics	O
to	O
,	O
say	O
,	O
all	O
h2	O
headings	O
had	O
to	O
repeat	O
HTML	B-Language
presentational	O
markup	O
for	O
each	O
occurrence	O
of	O
that	O
heading	O
type	O
.	O
</s>
<s>
CSS	B-Language
allows	O
the	O
separation	O
of	O
presentation	B-General_Concept
from	O
structure	O
.	O
</s>
<s>
CSS	B-Language
can	O
define	O
color	O
,	O
font	O
,	O
text	O
alignment	O
,	O
size	O
,	O
borders	O
,	O
spacing	O
,	O
layout	O
and	O
many	O
other	O
typographic	B-Application
characteristics	O
,	O
and	O
can	O
do	O
so	O
independently	O
for	O
on-screen	O
and	O
printed	O
views	O
.	O
</s>
<s>
CSS	B-Language
also	O
defines	O
non-visual	O
styles	O
,	O
such	O
as	O
reading	O
speed	O
and	O
emphasis	O
for	O
aural	O
text	O
readers	O
.	O
</s>
<s>
The	O
W3C	O
has	O
now	O
deprecated	B-General_Concept
the	O
use	O
of	O
all	O
presentational	O
HTML	B-General_Concept
markup	I-General_Concept
.	O
</s>
<s>
For	O
example	O
,	O
under	O
pre-CSS	O
HTML	B-Language
,	O
a	O
heading	O
element	O
defined	O
with	O
red	O
text	O
would	O
be	O
written	O
as	O
:	O
</s>
<s>
Using	O
CSS	B-Language
,	O
the	O
same	O
element	O
can	O
be	O
coded	O
using	O
style	O
properties	O
instead	O
of	O
HTML	B-Language
presentational	O
attributes	O
:	O
</s>
<s>
The	O
advantages	O
of	O
this	O
may	O
not	O
be	O
immediately	O
clear	O
but	O
the	O
power	O
of	O
CSS	B-Language
becomes	O
more	O
apparent	O
when	O
the	O
style	O
properties	O
are	O
placed	O
in	O
an	O
internal	O
style	O
element	O
or	O
,	O
even	O
better	O
,	O
an	O
external	O
CSS	B-Language
file	O
.	O
</s>
<s>
All	O
h1	O
elements	B-General_Concept
in	O
the	O
document	O
will	O
then	O
automatically	O
become	O
red	O
without	O
requiring	O
any	O
explicit	O
code	O
.	O
</s>
<s>
If	O
the	O
author	O
later	O
wanted	O
to	O
make	O
h1	O
elements	B-General_Concept
blue	O
instead	O
,	O
this	O
could	O
be	O
done	O
by	O
changing	O
the	O
style	O
element	O
to	O
:	O
</s>
<s>
The	O
styles	O
can	O
also	O
be	O
placed	O
in	O
an	O
external	O
CSS	B-Language
file	O
,	O
as	O
described	O
below	O
,	O
and	O
loaded	O
using	O
syntax	B-Application
similar	O
to	O
:	O
</s>
<s>
This	O
further	O
decouples	O
the	O
styling	O
from	O
the	O
HTML	B-Language
document	O
and	O
makes	O
it	O
possible	O
to	O
restyle	O
multiple	O
documents	O
by	O
simply	O
editing	O
a	O
shared	O
external	O
CSS	B-Language
file	O
.	O
</s>
