Next

Introduction to CSS

Understanding CSS

HTML was created to describe the content of a web page, like: h1, p, etc.

The tags like FONT, and color attributes were added to the HTML 3.2 specification later

It was expensive and difficult to maintain large websites where every page had to be added with fonts and colour to give a consistent look. to solve this problem the WWW Consortium (W3C) created 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.

What is CSS?

CSS stands for Cascading Style Sheets. Its a simple design language intended to make website design more presentable using a simplified approach.

The main aim of introducing CSS was that the structure of the website (HTML) and the design (CSS) could be separated. CSS handles the entire look and feel of the web page. Once can control how your web page looks with the help of CSS. CSS gives you the total control of what colors, margins, fonts, layouts, scree sizes, etc. that you can use on the web page

Most commonly, CSS is combined with the markup languages like HTML or XHTML.

Advantages of CSS

  1. CSS saves time: You can write CSS once and reuse it on many HTML pages. A Single CSS file can be applied to as many web pages as you want.
  2. Pages load faster : CSS does away with the need of using formatting attributes with html tags e.g. This can be replaced with just one CSS rule and all occurrences of that tag in HTML document will be applied with the specified formatting. So, less code; means the page will load faster
  3. Easy maintenance: Just one change to a CSS rule globally will simply change the style for all the style, and all the elements
    in all the web pages automatically.
  4. Superior styles to HTML: CSS has a much wider array of attributes than HTML, which will permit the user to give a much better look to the HTML page in comparison to the HTML attributes.
  5. Multiple Device Compatibility: Web pages are viewed on different devices of different screen resolution. The web page designed should adjust itself on any device and any screen resolution automatically and this can be done using style sheets.
  6. Global web standards: The HTML attributes are being deprecated and it is recommended to use CSS. So it’s a good practice to start using CSS in all the HTML pages to make them compatible with future browsers.

CSS Versions

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. Today CSS has various levels, each level of CSS builds upon the last, typically adding new features and typically denoted as CSS 1, CSS 2, CSS 2.1, CSS 3, etc.

Leave a Comment