Cascading Style Sheets

Save time, effort, bandwidth, and even your sanity by adding Cascading Style Sheets (CSS) to your repertoire of HTML-based skills. CSS is to Web development what templates are to word processing: create a style and apply it as you write.

Much of the content in any given HTML document is formatted the same way-the rough equivalent of body text or normal in a Word document. Instead of applying complex Font tags to each paragraph of text, create the default paragraph style (P) definition in the style sheet. The style sheet seamlessly applies the formatting each time you create a new paragraph. The same principal applies to headings, lists, list items, tables and a whole host of HTML elements. Most HTML editors provide point-and-click ease in applying styles.

CSS also allows total control and precision over placement and display. Advanced features such as DHTML rely on CSS to bring their magic alive. It provides the foundation for this type of interactivity.

Other Advantages of CSS include:

Separation of style and content – concentrate on content instead of formatting as you write.
Clean, compliant code – the World Wide Web Consortium (W3C), the recognized international Web standards authority, has deemed Font tags obsolete in HTML and requires CSS for HTML-compliant sites. If you want to add the W3C HTML-compliant image to your site, you have to use CSS.
Faster loading Web pages – fewer characters help make your Web site dial-up friendly.
Instant site-wide changes by redefining a style in the CSS – eliminates the need to search and replace Font tags every time you change your mind.
Control over how the user views your content – define alternate fonts to ensure proper display of your content.
Accessibility to a larger audience-PDA users, Web TV users, etc. – create a style sheet for each device.
It seems the entire vocabulary of HTML was created to ensure that this once-new frontier remained elusive to mere mortals, requiring some kind of secret pass code to gain entrance. CSS is no exception: linked, embedded, and inline style sheets. Chances are you’ll rarely, if ever, use an embedded or inline style sheet. Several excellent and inexpensive CSS tools are available to guide you through creating a style sheet in a learn-as-you-go tutorial environment, and most HTML editors include a built-in CSS editor. Learn the basics first, and tackle the rest on a need-to-know basis.

If you’re still using font tags, set aside some time to rid yourself of those relics and to transition from the HTML dark ages to the modern age. CSS is one strategy that average Web developers can implement to raise their Web development to a higher level of professionalism with minimal effort.

Leave a Reply

Your email address will not be published. Required fields are marked *


1 × = five