Skip to main content

CSS Introduction tutorial

What is CSS ?
  • CSS stands for Cascading Style Sheets.
  • CSS is an extension basic HTML that allows you to style your web pages.
  • CSS describes how HTML elements are to be displayed on screen, on paper, or in other media.
  • CSS saves a alot of work. It can control the layout of multiple Web pages all at once.
  • External Style Sheets are stored in CSS files.
History of CSS

CSS was invited by Hakon Wium Lie on October 10, 1994 and maintained through a group of people within the W3C called the CSS Working Group.

CSS Version
  •  Cascading STyle Sheets, level 1 (CSS1) was 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 was became a W3C recommendation in may 1998 and builds on CSS1. This version adds support for media-specific style sheets e.g. printers and aural devices, downloadable fonts, element positioning and tables.
  • CSS3 was became a W3C recommendation in june 1999 and builds on older versions CSS. It has divided into documentations is called as modules and here each module having new extansion fatures defined in CSS2.
CSS3 Modules
CSS3 Modules are having olde CSS specifications as well as extension features.
  • Selectors
  • Box Model
  • Backgrounds and Borders
  • Image Values and Replaced Content
  • Text Effects
  • 2D/3D
  • Animations
  • Multiple Colomn Layout
  • User Interface
 Advantages of CSS
  •  CSS Saves time - You can write CSS once and then reuse same sheet in multiple HTML pages. You can define a style for each HTML element and apply it to as many Web pages as you want
  • Pages load faster - If you are using CSS, you do not need to write HTML tag attributes every time. Just write one CSS rule of a tag and aplly it to all the occurrences of that tag. So less code mans faster download times.
  • Easy maintenance - To make a global change, simple change the style, and all elements in all the web pages will be updated automatically.
  • Superior style to HTML - CSS has a much wider array of attributes than HTML, so you can give a far better look to your HTML page is comparison to HTML attributes.
  • Multiple Device Compatibility - Style sheets allow content to be optimized for more than one type of device. By using the same HTML document, different versions of a website can be presented for handheld devices such as PDAS and cell phones or for printing.
  • Global web standards - Now HTML attributes are being deprecated and it is being recommended to use CSS. So it's a good idea to start using CSS in all the HTML pages to make them compatible to future browsers.
  • Offline Browsing - CSS can store web applications locally with the help of an offline catche. Using of this, we can view offlime websites. the cache aslo ensures faster loading and better overall performance of the website.
  • Platform Independence - The Script offer consistent platform independence and can support lastest browsers as well.
Disadvantages of CSS  

Fragmentation - CSS renders different dimensions with each browser. Programmers are required to consider and test all code acrosss multiple browsers for compatibility before taking any website or mobile application live.

Comments