CSS Tutorials

adplus-dvertising
Introduction of CSS
Previous Home Next

Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language.

Cascading style sheets are used to format the layout of Web pages. They can be used to define text styles, table sizes, and other aspects of Web pages

CSS, also known as Cascading Style Sheets, is used to style and control the layout of webpages. This language is used to define the presentation of HTML elements on a webpage. CSS can be used to define colors, fonts, borders, and the layout of a webpage.

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.

The History of CSS

Cascading Style Sheets, or CSS, are a way to add formatting to HTML which has extremely limited means of presentation.One of the major appeals of CSS is the ability to provide a central place to control what your pages look like.

Unlike HTML, where you have to change the settings on each page manually, with CSS you can change all your web pages from a central file stored on the server. This ability and design options make CSS the best choice for web design.

By the time CSS was released as a standard the browser companies had altered HTML to include many styling commands in order to make HTML documents more attractive. This means that although the idea for CSS has been around as long as HTML, it is playing catch up with HTML technology. It is not so much as new set of standards standard as a pulling back in line of markup languages with the original conception of the standards.

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 apply to all the occurrences of that tag. So less code means faster download times.

  • Easy maintenance: To make a global change, simply change the style, and all elements in all the web pages will be updated automatically.

  • Superior styles to HTML: CSS has a much wider array of attributes than HTML so you can give far better look to your HTML page in comparison of 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 its a good idea to start using CSS in all the HTML pages to make them compatible to future browsers.

  • Easily change the look: your pages even after they're created. Since the styles are defined in one place you can change the look of the entire site at once.

  • position the content: your pages with pixel precision.

  • Define customized styles for links: such as getting rid of the underline.

  • redefine entire HTML tags: Say for example, if you wanted the bold tag to be red using a special font this can be done easily with CSS.

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.

CSS Versions:

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 is still in development, but will add support for additional presentation media to the mix, such as aural (audio) styling. CSS3 will also involve a restructuring of CSS into modules that support different styling elements. This will not affect older style sheets, it will merely provide a better way of structuring new ones.

CSS Solved a Big Problem

HTML was NEVER intended to contain tags for formatting a document. HTML was intended to define the content of a document

CSS Saves a Lot of Work!

The style definitions are normally saved in external .css files. With an external style sheet file, you can change the look of an entire Web site by changing just one file.

Previous Home Next