oursolutionarchitectoursolutionarchitect
  • Selected Reading
  • Q&A

What is CSS?


What is CSS?

Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to transform the presentation of a Web Pages as well as many ostensibly nonweb environments.

CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text, the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what background images or colors are used, layout designs,variations in display for different devices and screen sizes as well as a variety of other effects.

CSS is easy to learn and understand but it provides powerful control over the presentation of an HTML document. Most commonly, CSS is combined with the markup languages HTML or XHTML.

Strictly speaking CSS is not a programming language but it does require abstract thought. It is also not purely a design tool, but it does require some creativity.

Where do we use CSS?

CSS is being used extensively in web and non web based applications :

  • All modern websites make use of CSS to beautify their web pages.
  • Embedded-device displays often use CSS to style their user interfaces.
  • RSS clients also let you apply CSS to feeds and feed entries.
  • Instant message clients also use CSS to format chat windows.
Aspects of CSS can be found in the syntax used by JavaScript and its frameworks, so we can say CSS is everywhere!

History of CSS

Cascading Style Sheets level 1 (CSS1) came out of W3C as a recommendation in December 1996. This version describes the CSS language as well as a simple visual formatting model for all the HTML tags.

CSS2 became a W3C recommendation in May 1998 and builds on top of CSS1. This version adds support for media-specific style sheets e.g. printers and aural devices, downloadable fonts, element positioning and tables.

CSS3 became a W3C recommendation in June 2012 and builds on older versions CSS. it has divided into documentations called as Modules and here each module having new extension features defined in CSS2.

Year Description
1994 HÃ¥kon Wium Lie proposed the idea of CSS to allow web designers to change the layout, colors, and fonts of their websites.
1996 The first version of CSS was released while the newly established CSS Working Group moved forward with CSS2.
1998 The second version of CSS was released and work on CSS-3 started at the same time.
2011 A clarified version of CSS2 called CSS2.1, was released, which fixed the errors found in CSS 2
2012 As of June 2012, there are over fifty CSS modules published from the CSS-3 Working Group.

Myth about CSS4

Yes it's a myth that there will be a CSS4, so let me tell you there has never been a CSS4. There will never be a CSS4. CSS4 is not a thing that exists.

How CSS Works?

First of all we define some classes in the form of rules using CSS to apply some styles like fonts, colors, size etc: Under various conditions, we want certain things to happen for example if element X is a child of element Y, apply those styles. Next these classes are added to the HTML elements. The browser then takes these rules, figures out which ones apply where, and uses them to render the page.

Style Sheets Origin

The stylesheets you add to your web page aren’t the only ones the browser applies. There are different types, or origins, of stylesheets:

  • User agent styles - This is the default style which browser applies to any web page.

  • Author styles - Your stylesheets are called author styles which override user agent styles.

  • User stylesheet - Some browsers let users define a user stylesheet and these are rarely used.

Who Maintains CSS?

CSS is created and maintained through a group of people within the W3C called the CSS Working Group. The CSS Working Group creates documents called specifications. When a specification has been discussed and officially ratified by the W3C members, it becomes a recommendation.

These ratified specifications are called recommendations because the W3C has no control over the actual implementation of the language. Independent companies and organizations create that software.

The World Wide Web Consortium, or W3C is a group that makes recommendations about how the Internet works and how it should evolve.

CSS Modules

A CSS Module is a CSS file in which all class names and animation names are scoped locally by default. There are number of modules available CSS3, we are going to list a few of them:

  • Selectors
  • Box Model
  • Backgrounds and Borders
  • Image Values and Replaced Content
  • Text Effects
  • 2D/3D Transformations
  • Animations
  • Multiple Column Layout
  • User Interface