|
Web
Design Articles
What is
CSS?
Cascading
style
sheets,
or CSS,
is a
language
designed
to allow
a
designer
to
specify
how a
document
should
be
presented.
CSS can
be used
with any
markup
language,
but its
main use
is with
the HTML
code
that
makes up
a web
page.
In the
early
days of
the
World
Wide
Web, web
page
designers
had to
include
within
the HTML
code for
each
page the
various
style
commands
needed
to
display
the page
as it
was
intended.
These
commands
covered
such
things
as what
font
style,
size and
color to
use, the
background
color to
be used,
and
several
more
such
commands.
This led
to HTML
files
that
were
more
complex
than
necessary,
and made
it
harder
to
ensure
that a
web site
had a
consistent
look
across
all
pages.
In
addition,
the
major
browsers
at the
time had
different
interpretations
of how
some of
these
commands
should
work.
In the
mid-1990s
the
World
Wide Web
Consortium
(W3C)
began to
look at
ways to
simplify
the use
of style
commands
within
HTML,
and in
1996 CSS
1 was
introduced,
followed
a year
later by
CSS 2.
Despite
attempts
since
then to
release
firstly
CSS 2.1,
and then
CSS 3,
CSS 2 is
still
the
standard
model,
although
many
browsers
today
support
some
parts of
the CSS2
.1
feature
set.
Browser
support
for CSS
was slow
to
emerge,
and it
took
nearly
four
years
before
the
major
browsers
included
full
support
for CSS.
Since
then
nearly
all
browsers
support
CSS,
although
even
today
there
are
still
bugs and
idiosyncrasies
that
prevent
pages
from
displaying
as they
should
in a
consistent
manner
on all
browsers.
There
are
assorted
work-rounds
and
fixes
for
these
issues
but this
has
deterred
some web
page
designers
from
using
CSS, as
ensuring
full
support
for all
browsers
can be
time-consuming
and
costly.
Despite
these
shortcomings
the
introduction
of CSS
has
simplified
web page
design
in many
ways. It
is a lot
easier
to
ensure
that all
pages on
a
particular
site
have a
consistent
look,
simply
by using
a single
style
sheet
for the
whole
web
site. It
is also
a lot
easier
to
change
the
style
used for
the web
site, as
rather
than
editing
the HTML
code for
every
page,
all that
a
designer
need do
is
change
the
appropriate
style
sheet.
In
addition,
by using
different
style
sheets,
the
designer
can
present
the same
information
in
different
ways,
depending
on the
type of
device
used to
access
it.
Although
slow to
mature,
and
still
undergoing
some
growing
pains,
it seems
clear
that
Cascading
Style
Sheets
are here
to stay. |