Cascading Style Sheets (CSS)

CSS is a W3C standard that gives Web developers more control over how the pages of a Web site will look when displayed on a Web browser.

What is CSS (Cascading Style Sheets)?

A standard from the World Wide Web Consortium (W3C) that gives Web developers more control over how the pages of a Web site will look when displayed on a Web browser.

The cascading style sheets (CSS) standard gives Web developers control over design elements such as fonts and font sizes, and allows two-dimensional overlapping and exact positioning of page elements.

The CSS standard also makes it easier to globally change the style and appearance of a Web site.

How CSS Works

Traditionally, Hypertext Markup Language (HTML) was designed for logical communication of linked information without much regard for its style or format, and was not designed to provide a high degree of control over how that information is laid out on a page. Using CSS, a Web developer can control the appearance of an entire Web site, or a portion of it, using a single HTML page called a style sheet.

These style sheets define the functions of different HTML tags on your site’s Web pages and allow you to make global changes to your site’s style by changing a single entry on a style sheet. Web pages then link to style sheets using a <LINK> tag.

For example, you can use a style sheet to define the <H1> tag as representing green, 18-point, Arial font text, and you can then apply this style to the entire site or a portion of it. Cascading style sheets involve the operation of several levels of style sheets that provide control over how an element on an HTML document is placed. CSS applies these settings in the following order:

  • The STYLE attribute in the object's tag
  • The STYLE element between the <TITLE> and <BODY> tags that specifies the style sheet to be used
  • The settings of the browser accessing the page and its default style sheet