29 June 2005

What is CSS?

Many of you who have struggled with setting up webpages in (e.g.) LiveJournal may have noticed that much of the web design and configuration is done through cascading style sheets (CSS). A style sheet is a part of web site that defines attributes of certain tags, so that a large and complex web site can be encoded with custom tags. The site’s look and feel is determined by CSS scripts (little bits of descriptive code), while the definitions of the document’s structure are written in another markup language, like HTML. A stylesheet is like the legend found at the front of an atlas; the rest of the maps found in the atlas will use the symbols to indicate features, and direct you to page xvii so you know what they signify.

CSS actually works with different types of markup languages, such as XHTML, HTML, XML, and scalable vector graphics (SVG).

The virtue of stylesheets is that one can use them to set up sites like Blogger (where you are now!) , where users can choose a format without knowing any HTML at all. While I have used some HTML to edit the template of Reshaping Narrow Law and Art, I did not have to. In fact, as this site from Zen Garden shows, you can actually have the visiting browser chose the look and feel of the site. By clicking on the “design” options on the right, you are simply directing your browser to another stylesheet, while the underlying web page remains the same.

UPDATE (12 Oct 2007): More on CSS here
tags: in markup languages like HTML, XML, TEX, and others, the programmer uses tags enclosed by some symbol, like "<" and ">." The tag is a command to the interpreter (such as your web browser) to read the subsequent text in a particular way. Those of you familiar with old DOS-based word processing applications like WordPerfect 5.1 or WordStar will recall that it was possible to select F12 and view the formatting. I recall WP tags were in square brackets, thus:
           [BOLD]this is bold[bold] this is not bold.
Years later I learned that an essentially identical system is used to generate the WSIWYG displays of modern GUI world processor applications.
SOURCES & ADDITIONAL READING: Andrew Fernandez, CSS tutorial;

Labels: , ,


Post a Comment

<< Home