CSS

  • CSS stands for Cascading Style Sheets
  • Styles define how to display HTML elements
  • Styles were added to HTML 4.0 to solve a problem
  • External Style Sheets can save a lot of work
  • External Style Sheets are stored in CSS files

ABOUT CSS

As Cascading Style Sheets mature as a language of design and a tool of Web site and application management, a deep understanding of how the language really works is essential. However, most people have learned CSS the same way they’ve learned HTML,by viewing source, copying template codes, reading books and articles. While this “bootstrap” method of learning is often the best way to find great techniques, it may not be the best for knowing how to manage, debug, customize and even advance those techniques.

What our training hasn’t necessarily provided are the core concepts within CSS. This is why the Core CSS series may contain simple examples of things you already know. You’ll just get to know them better here! In this foundational reference card, you’ll find not only a bit of history and rationale for use, rule structure and syntax, but also a thorough resource as to the Cascade, inheritance and specificity,core principles of CSS that will expand and strengthen your professional ability to work with CSS.

CSS RATIONALE AND USE

The idea behind CSS is not a new one. We’ve seen the separation of presentation before in desktop publishing, where master style sheets can be created to control the layout, typefaces and colors used in a given design. Cascading Style Sheets were conceived to do exactly that: Remove the style from the document and place it separately from the code to be styled.

The benefits, when used carefully, can be outstanding. Some benefits of using style sheets include:

  • Design flexibility
    More image options
    Better typographic control
    Far more flexible layout options
    Print design support
    Handheld device design support
  • Easier site maintenance
    One style sheet, infinite pages
    Design changes are very easy
    Changes can be made quickly
    Reduces time to launch
  • Measurable returns
    Faster loading documents
    Far smaller documents
    User experience improves
    Accessibility improves
    SEO (search engine optimization) improves

The first proposal for CSS was made by Håkon Wium Lie, now CTO of Opera Software. He worked with Bert Bos to co-author the first CSS specification, which believe it or not, became a recommendation in 1996! By 1998 CSS 2.0 brought us richer options, as we find later in advancing versions CSS 2.1 and CSS 3.0.

Version Date Implementations
CSS 1.0 First proposed 1994, First specification in 1996 Still flawed CSS 1 portions in all CSS browsers
CSS 2.0 1998 No full implementation
CSS 2.1 Not yet published as a complete specification Some close to complete implementations
CSS 3.0 (Modular) Certain modules are ahead of others in development Some CSS 3.0 features are implemented in versions of WebKit, Mozilla and Opera browsers

Leave a comment