The Benefits and Uses of CSS

 

Use of CSS in Building a Website (Individual or Group Projects)

The most consequential advantage of using CSS is that “global” changes to a website from a single “linked” style sheet can be made to control the appearance of all the pages within a website. Web designers can easily maintains a uniform or “House” look for an entire website with but a single linked CSS style sheet.

Theoretically, a single style sheet can be used to format hundreds, thousands, or even millions of web pages. If a change is made to the external style sheet, all the web pages in whole websites that link to the style sheet are instantly updated to reflect those changes to the styles.

In practical terms, CSS offers more precise, and predictable stylistic control over presentation than simple HTML. CSS grants greater cross-platform precision as a web page is shown in a much more presentable manner, regardless of PC Monitor dimensions or vendor. CSS allows for improved web document printing, for similar reasons. CSS style sheets allow for complex “Border”, “Margin”, and other spacing controls to most HTML elements. CSS also extends the capabilities introduced by most of the existing HTML browser extensions.

For example, “Background Color” or “Images” can now be assigned to any HTML element, rather than, just the <BODY> element. In turn, “Borders” can now be applied to any element, instead of just to “Tables”, enabling web designers to concoct “Rollover Style” Buttons with only mark-up and without the need for graphic images.

In particular, the use of CSS provides much more control over the appearance of “Tables” than can be achieved through HTML mark-up alone, as a single entry in a style sheet can change the formatting of every “Cell”, where such would require multiple <FONT> attribute inserts inside each and every one of those same cells.

A number of Table elements were introduced as part of HTML 4, which require the use of CSS styles to provide visual formatting. The <TBODY>, <THEAD>, <TFOOT>, <COL>, and <COLGROUP> elements do not, by themselves, have visual formatting, but can be used in conjunction with CSS styles to format “Row” and “Column” groups in Tables.

Also, the <CENTER> and <ALIGN> elements are deprecated in all instances, except for use with “Tables”, in favor of using CSS styles to achieve similar or better results. Since CSS is designed solely to define appearance as efficiently as possible, the positioning for elements is more efficient with using exact pixel coordinates to precisely position an element. This capability alone will serve to eliminate a lot of unnecessary invisible spacer “.gif”'s and Table tags.

The use of styles to format Tables also provides for better accessibility by separating the “presentation” format structure from the Table hierarchical “organization” and accompanying “content”. A non-visual web browser can easily ignore any presentation features defined by CSS styles and instead, focus upon conveying the content of a Table.

Disadvantages of CSS

CSS disadvantages seem to all revolve around web browser compliance. Indeed, the primary obstacle to the universal implementation of CSS styles by web designers is that “users” are still employ older web browsers to access the Internet which do not provide adequate support for style sheet rules.

Many older web browsers provide poor support for linking to an “external” CSS stylesheet, such as Netscape Navigator 1.2 and 4 (earlier versions) or Internet Explorer 2 and 3 (flawed implementation), and provide poor support for the formatting rules applied, therein.

These earlier web browsers that only partially support CSS styles have problems with type “em” measurements, which can negatively impact the very readability for a web page. For example, Internet Explore 3.x treats (1) em as equal to only (1) pixel, causing the now tiny text to be completely illegible. The use of “points” when specifying type measurements with CSS is also problematic, since points and “pixels” are equivalent by default on a Macintosh system, but are not equivalent on a Windows PC, due to the different dot pitches at which fonts are displayed with a (72) dpi on a Mac and (96) dpi with Windows PCs.

Many web designers then still choose to use deprecated HTML elements and attributes, rather than implement CSS styles, because of the backward compatibility issues that their use may pose with these older web browsers.

Another disadvantage of CSS styles is related to their use in formatting “Tables” in that many earlier web browsers either do not support the above-mentioned expanded element styles or poorly implement them. Even among current web browser versions, how these CSS style features are supported and how they are implemented can widely vary from vendor to vendor.

Setting the “Horizontal Alignment” using CSS styles, rather than, the <CENTER> or <ALIGN> elements is somewhat more complex than using these deprecated tags provided under HTML and are affected by major bugs in Internet Explorer 5.5 for Windows.

Also, the intent behind use of a CSS style sheet is to only specify information that controls display and rendering rules. “Virtual” style elements that convey the nature of the page content can not be replaced by CSS style sheets, nor are “hyperlinks” and multimedia “object” insertion, a part of style sheet functionality.

Finally, users can become irritated with any extra download time that may be required to import style information for each web page, as the rendering of a document is slightly delayed until the “external” style sheet is fully loaded from its web server.

The Future Uses of CSS

Many of the deprecated elements and attributes in HTML 4 are now deprecated in favor of CSS to achieve similar and often superior results. The finalization of CSS 3 recommendations will serve to expand this capability and, as is intended, become the de facto standards for web development. In particular, development of design style sheets profiles for “wireless” Telephones and other Handheld mobile devices, offers to expand web design into new areas of commerce. The upcoming finalization for recommendations regarding “Printer Profiles” so that printing can be done from mobile devices where a printer specific driver is not an option -- will serve to make such devices into true full-fledged, computing platforms.

CSS is then, in spite of its advantages or disadvantages, now both an essential aspect of web design and a means to extend the capabilities of HTML in designing websites with visually superior, more interactive, and more accessible web pages. CSS has become “the” solution for web designers to embrace as the future of style designation in web pages.

Web Designers must then know how to design using both deprecated HTML elements and CSS style sheets to achieve a robust web layout with complete cross-platform compatibility.

 

BACK

 

HOME PAGE   |   WEB HOST PROVIDERS   |   BENEFITS OF CSS   |   TEAM MEMBERS   |   SITE MAP