CSS Tutorial

Introduction

  • CSS stands for Cascading Style Sheet.
  • It is a Style sheet language.
  • It describes the presentation of an HTML or XML document.
  • CSS is used to control the web document in a simple and easy way.
  • CSS was developed by Hakon Winm Lie of MIT in 1994.

Concept of Style Sheets

  • Style sheet describes how documents are present on screen.
  • It is a collection of formatting rules that affect the appearance of one or more document.
The two most common style sheets are:

1) XSLT
  • eXtensible Style sheet Language Transformation.
  • It is applicable only for XML document.
2) CSS
  • Cascading Style Sheets.
  • It is applicable for HTML and XML or any web language.

HTML v/s CSS

HTMLCSS
HTML stands for hyper text mark up language.CSS stands for Cascading Style Sheet.
It specifies web page elements like table, paragraph etc.CSS determines an element size, color etc.
It is used to identify the content of the web page.It is used to specify the presentation of that content.
It is used for defining the web page structure.CSS is used for styling and formatting the structured content of the web pages.

Advantages of CSS

Reusability: It means CSS file once created can be reused.

Easy maintenance: If any changes are required for any web page or document then changes can be simply made in a CSS file where all elements in the web pages or document will be updated automatically.

Download content faster: CSS requires less code and controls the order of element so that content can be downloaded before images.

Platform Independent: The scripts are platform independent and support all  the latest browsers.

Data Integrity: CSS allows to maintain the integrity of data.

Limitations of CSS

  • CSS cannot create layout effect.
  • It does not  give absolute control over a page's appearance.
  • It does not guarantee any kind of absolute pixel control.