Cascading Style Sheets (CSS) is a style sheet words used for
unfolding the presentation of a document CSS is
written in a markup language. Although
most often used to set the illustration style of web pages and
designed primarily to enable the screen
of document content from document presentation, as well as aspects CSS
has a simple syntax
and uses a number of English keywords to detail the names of various style
properties. A style sheet consists of a list of rules. Each rule or
rule-set consists of one or more selectors, and a declaration block. In CSS, selectors
declare which part of the markup a style
applies to by similar tags and attributes in the markup itself. All elements
of a specific type, e.g. the second-level headers h2 Elements specified by attribute, in particular: id:
an identifier unique within the document class: an identifier that can
annotate numerous elements in document elements depending on how they
are placed relation to others in the document tree. Classes and IDs are case-sensitive, start with letters, and
can include alphanumeric characters and underscores. A class may apply to any
number of instances of any elements. An ID may only be applied to a single
element. Pseudo-classes are used in CSS selectors to permit formatting based on information
that is not contained in the document tree. One example of a widely used
pseudo-class is: hover,
which identifies content only when the user "points to" the visible
element, usually by investment the mouse cursor over it. It is appended to a
selector as in a: hover or #elementid: hover. A pseudo-class classifies document elements, such as
:link or :visited, whereas a pseudo-element makes a selection that may consist of fractional
elements, such as ::first-line or ::first-letter. Selectors may be combined in many ways to achieve great
specificity and litheness. Multiple selectors may be joined in a spaced list to
identify elements by location, element type, id, class, or any
combination thereof. The order of the selectors is important. For example, div .my
Class {color: red;} applies to all elements of class my Class that are inside
div elements, whereas .my Class div {color: red;} applies to all div elements that are in elements of class my
Class. A declaration block consists of a list of declarations in braces.
Each assertion itself consists of a property, a colon (:), and a value. If
there are multiple declarations in a block, a semi-colon (
;) must be inserted to divide
each declaration. Properties are
specified in the CSS normal. Each property has a set of possible values. Some
properties can affect any type of element, and others apply only to particular
groups of elements. Values may be
keywords, such as "center" or "inherit", or arithmetical
values, such as 200px (200 pixels), 50vw (50 percent of the viewport width) or
80% (80 percent of the window width). Color values can be specified with
keywords (e.g. "red"), hexadecimal values (e.g. #FF0000, also
abbreviated as #F00), RGB values on a 0 to 255 scale (e.g. rgb(255, 0, 0)),
RGBA values that specify both color and alpha lucidity (e.g. rgba(255, 0, 0, 0.8)),
or HSL or HSLA values (e.g. hsl(000, 100%, 50%), hsla(000, 100%, 50%, 80%)). Before
CSS, nearly all presentational attributes of HTML documents were contained
within the HTML markup. All font colors, background styles, element alignments,
borders and sizes had to be explicitly describe, often repeatedly, within theHTML. CSS lets authors shift much of that information to another file, the
style sheet, resulting in considerably simpler HTML. For example, headings (h1
elements), sub-headings (h2), sub-sub-headings (h3), etc., are definite
structurally using HTML. In print and on the screen, choice of font, size, color
and importance for these elements is presentational. Before CSS, document
authors who wanted to assign such typographic characteristics to, say, all h2 headings
had to repeat HTML presentational markup for each happening of that heading
type. This made documents more complex, larger, and more error-prone and
difficult to maintain. CSS allows the taking apart of presentation from
structure. CSS can define color, font, text alignment, size, borders, spacing,
layout and many other typographic characteristics, and can do so in For example, under pre-CSS HTML, a heading
element defined with red text would be written as: <h1><font color="red"> Chapter 1. </font></h1> Using
CSS, the same element can be coded using style properties instead of HTML
presentational attributes: <h1 style="color:
red;"> Chapter 1. </h1> An "external" CSS file,
as described below, can be associated with an HTML document using the following
syntax: <link href="path/to/file.css" rel="stylesheet"> An internal CSS code can be typed in the head section of
the code. The coding is in progress with the style tag. For example, <style> CSS
information can be provided from various sources. These sources can be the web
browser, the user and the author. The information from the author can be
further classified into inline, media type, importance, selector specificity,
rule order, inheritance and property definition. CSS style information can be
in a divide document or it can be embedded into an HTML document. Multiple
style sheets can be imported. Different styles can be applied depending on the
output device being used; for example, the screen version can be quite unlike
from the printed version, so that authors can tailor the donation appropriately
for each medium. The style sheet with the highest priority controls the content
display. Declarations not set in the highest priority source are passed on to a
source of lower priority, such as the user agent style. This process is called cascading.
One of the goals of CSS is to allow users greater control over presentation.
Someone who finds red italic headings difficult to read may apply a different
style sheet. Depending on the browser and the web site, a user may choose from
various style sheets provided by the designers, or may remove all added styles
and view the site using the browser's defaulting styling, or may override just the
red italic heading style without altering other attributes. CSS was first
proposed by Håkon Wium Lie on October
10, 1994. At the time, Lie was working with Tim Berners-Lee at CERN. Several
other style sheet languages for the web were projected around the same time,
and discussions on public mailing lists and inside World Wide Web Consortium
resulted in the first W3C CSS Recommendation (CSS1) being on the loose in 1996.
In particular, Bert Bos' proposal was influential; he became co-author of CSS1
and is regarded as co-creator of CSS. Style
sheets have existed in one form or another since the first phase of Standard
Generalized Markup Language (SGML) in the 1980s, and CSS was developed to
provide style sheets for the web. One condition for a web style sheet language
was for style sheets to come from unlike sources on the web. Therefore,
existing style sheet languages like DSSSL and FOSI were not suitable. CSS, on
the other hand, let a document's style be influenced by multiple style sheets
by way of "cascading" styles. As
HTML grew, it came to cover a wider variety of stylistic capabilities to meet
the strain of web developers. This evolution gave the designer more control
over site appearance, at the cost of more complex HTML. Variations in web
browser implementations, such as ViolaWWW and WorldWideWeb, made dependable
site appearance difficult, and users had less control over how web content was
displayed. The browser/editor developed by Tim Berners-Lee had style sheets
that were hard-coded into the agenda. The style sheets could therefore not be
linked to papers on the web. Robert Cailliau, also of CERN, wanted to separate
the construction from the presentation so that different style sheets could
describe different presentation for printing, screen-based presentations, and
editors. Improving web presentation
capabilities was a topic of interest to many in the
competition
for on-screen and printed views. CSS also defines non-visual styles, such as
reading speed and emphasis for aural text readers. The W3C has now deprecated
the use of all presentational HTML mark up.web the public and nine
different style sheet languages were proposed on the www-style mailing list. Of
these nine proposals, two were especially influential on what became CSS:
Cascading HTML Style Lie's proposal was
presented at the "Mosaic and the Web" conference (later called WWW2)
in Chicago, Illinois in 1994, and again with Bert Bos in 1995. Around this time
the W3C was already being reputable, and took an interest in the development of
CSS. It organized a workshop toward that end chaired by Steven Pemberton. This
resulted in W3C adding work on CSS to the deliverables of the HTML editorial
review board (ERB). Lie and Bos were the primary technical staff on this aspect
of the project, with additional members, including Thomas Reardon of Microsoft,
participating as well. In August 1996 Netscape Communication Corporation accessible
an alternative style sheet language called JavaScript Style Sheets (JSSS). The
spec was never finished and is deprecated. By the end of 1996, CSS was ready to
become official, and the CSS level 1 Recommendation was published in December. Development
of HTML, CSS, and the DOM had all been taking place in one group, the HTML
Editorial Review Board (ERB). Early in 1997, the ERB was split into three working
groups: HTML Working group, chaired by Dan Connolly of W3C; DOM Working group,
chaired by Lauren Wood of SoftQuad; and CSS Working group, chaired by Chris
Lilley of W3C. The CSS Working Group began tackling issues that had not been
addressed with CSS level 1, resulting in the creation of CSS level 2 on
November 4, 1997. It was published as a W3C Recommendation on May 12, 1998. CSS
level 3, which was started in 1998, is still under development as of 2014.user
Sheetsand Stream-based Style Sheet Proposal (SSP). Two
browsers served as testbeds for the initial proposals; Lie worked with Yves
Lafon to implement CSS in Dave Raggett's Arena browser. Bert Bos implemented
his own SSP proposal in the Argo browser. Thereafter, Lie and Bos worked
together to build up the CSS standard (the 'H' was removed from the name
because these style sheets could also be applied to other markup languages
besides HTML).
such as the layout,
colors, and fonts. This severance can improve content ease of access, provide
more litheness and control in the specification of presentation
characteristics, enable multiple HTML pages to share formatting by specifying
the related CSS in a separate .css file, and reduce complexity and replication
in the structural content. Separation of formatting and content makes it
possible to present the same markup page in different styles for different
rendering methods, such as on-screen, in print, by voice (via speech-based
browser or screen reader), and on Braille-based tactile devices. It can also
display the web page differently depending on the screen size or viewing
device. Readers can also identify a different style sheet, such as a CSS file store
on their own computer, to override the one the author particular. Changes to
the graphic design of a document (or hundreds of documents) can be applied speedily
and easily, by editing a few lines in the CSS file they use, rather than by
changing markup in the documents. The CSS condition describes a priority scheme
to resolve which style rules apply if more than one rule matches against a
particular element. In this so-called cascade, priorities (or weights) are
calculated and assigned to rules, so that the results are predictable. The CSS condition
are maintained by the World Wide Web Consortium (W3C). Internet media kind (MIME
type) text/css is registered for use with CSS by RFC 2318 (March 1998). The W3C
operates a free CSS legalization service for CSS documents.
interfaces
written in HTML and XHTML, the language can be practical to any XML document,
including plain XML, SVG and XUL, and is pertinent to rendering in speech, or
on other media. Along with HTML and JavaScript, CSS is a foundation technology
used by most websites to create visually appealing web pages, user interfaces
for web applications, and user interfaces for many mobile applications.
In 2005 the CSS Working Groups decided to enforce the necessities
for standards more strictly. This meant that already published standards like
CSS 2.1, CSS 3 Selectors and CSS 3 Text were pulled back from
Candidate Recommendation to Working Draft level. The CSS 1 specification
was done in 1996. Microsoft's Internet Explorer 3 was on the loose in that
year, featuring some limited support for CSS. IE 4 and Netscape 4.x added more
support, but it was typically incomplete and had many bugs that prevented CSS
from being usefully adopted. It was more than three years before any web browser
achieved near-full accomplishment of the specification. Internet Explorer 5.0
for the Macintosh, shipped in March 2000, was the first browser to have full
(better than 99 percent) CSS 1 support, surpassing Opera, which had been
the leader since its introduction of CSS support 15 months earlier. Other
browsers followed soon afterwards, and many of them additionally implemented
parts of CSS 2. However, even when later 'version 5' browsers began to
offer a fairly full implementation of CSS, they were still incorrect in positive
areas and were fraught with inconsistencies, bugs and other quirks. The
inconsistencies and variation in feature support made it not easy for designers
to achieve a consistent appearance across browsers and platforms, leading to
the use of workarounds such as CSS hacks and filters. Problems with browsers'
patchy espousal of CSS, along with errata in the original specification, led
the W3C to revise the CSS 2 standard into CSS 2.1, which moved nearer
to a working snapshot of current CSS support in HTML browsers. Some CSS 2
properties that no browser successfully implemented were dropped, and in a few
cases, defined behaviors were changed to bring the standard into line with the
predominant existing implementations. CSS 2.1 became a Candidate counsel
on February 25, 2004, but CSS 2.1 was pulled back to Working Draft status
on June 13, 2005, and only returned to Candidate Recommendation status on July
19, 2007. In addition to these problems,
the .css extension was used by a software product used to convert PowerPoint
files into dense Slide Show files, so some web servers served all
.css as mime type application/x-pointplus
rather than text/css.

