Introduction of CSS
- What Is CSS ?
-
Cascading Style Sheets, popularly called CSS, is a simple design language intended to simplify the process of making web pages presentable.
- CSS handles the look and feel part of a web page.
-
Using CSS, we 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, as well as a variety of other effects.
- Advantages Of CSS
-
CSS saves time .
-
Pages load faster.
-
Easy maintenance.
-
Superior styles to HTML.
-
Multiple Device Compatibility .
- Who creates and 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 W3C members, it becomes a recommendation.
-
These specifications are called recommendations because the W3C has no control over the actual implementation of the language. It depends on the browser.
CSS Versions
-
Cascading Style Sheets, level 1 in December 1996.
-
CSS2 in May 1998.
-
The work on CSS3 has been going on for years, but seems to advance very slowly. CSS3 is divided into modules, and the idea is that each module can become a recommendation independently from the others. No module has reached that stage, but some parts of the CSS3 specification have already been implemented by browsers.
CSS Syntax
selector { property: value }
- CSS Syntax Description
The syntax for CSS is different than that of HTML markup but is case insensitive.
It consists of only 3 parts.
-
Selector: A selector is an HTML tag at which style will be applied. This could be any tag like <h1> or <table> etc.
-
Property: A property is a type of attribute of HTML tag. Put simply, all the HTML attributes are converted into CSS properties. They could be color or border etc.
-
Value: Values are assigned to properties. For example color property can have value either red or #F1F1F1 etc.