6.1. What Are Cascading Style Sheets?

On the World Wide Web and in any intranet site, content is key for any web page. Cascading Style Sheets (CSS) describe the presentation of that content. CSS is used to define aspects such as colors, fonts, background styles, layout of elements, and more. The CSS declaration (often referred to as a rule) contains two parts: the selector and the declaration (containing one or more properties and their values). The selector indicates what to style, and the declaration specifies how to style it. The following shows the parts of the CSS statement:

Selector {property: value;}

6.1.1. Styling versus Formatting Objects

As the Internet grew more and more popular, browsers such as Netscape and Microsoft's Internet Explorer continued to introduce new HTML tags and attributes to format content. These tags served the purpose, but they made the content look very cluttered. In addition, because Microsoft, Netscape, and others were competing for the same market share and introducing tags that worked with their browser, not all formatting tags worked uniformly in all browsers. CSS was envisioned and produced by the World Wide Web Consortium (W3C) to resolve those issues. You can find more info on that at http://w3.org/Style/CSS. Styling the objects separates the content from the markup that produces the final presentation layer, thus reducing the inline code required to format the objects. This makes the management of the content and style an easier task. ...

Get Professional Microsoft® SharePoint® Designer 2007 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.