This month's newsletter is a short summer follow up to last month's newsletter about the current state of web browsers. It's also short because, for the first time in ten years since starting Newfangled, I've been able to take a week long vacation (two of them, in fact). Thank you, Mark O'Brien! Last month we reviewed the current crop of browsers and discussed some positive movement toward adopting browser standards, including the way Cascading Style Sheets (CSS) are implemented. Cascading Style Sheets have been around for quite a while - if you're a web designer this subject may seem archaic - yet their effective use depends a lot on how all the various browsers support CSS standards, and that's where it gets tricky. This month we'll describe what CSS is and why it's so helpful. We'll also discuss how they can be implemented in the context of an imperfect web browser environment.
Once upon a time in web design land, web pages were coded entirely in HTML. The evolution of web design has introduced new, better ways of creating web pages. HTML was a very inefficient way of telling a web browser how to display a web page because every aspect of how words and pictures were displayed (including position, size, color, and font) had to be embedded in the page using HTML tags. These tags had to surround every piece of content. If you wanted to make a sub-head green you had to insert font tags that told the browser to make the words green. If you've ever viewed the source code of a web page you'll see HTML tags that describe such settings all over the place. These tags had to be repeated every sub-head occurrence. Formatting content in HTML was a lot of work. In fact, it used to be one of the largest line items in our web development proposals.
In addition to being cumbersome, the process was also inflexible. Imagine a site with hundreds of sub-heads all tagged to be green. Now, suppose you wanted to change the sub-heads to blue. Every instance of green tags would then have to be replaced with blue tags to implement the design change.
CSS to the Rescue
Cascading Style Sheets fixed this problem. Rather than embedding tags that tell a browser how to display content, CSS tags are used to tell the browser what the content is. So, rather than surrounding a sub-head with green tags, you surround it with sub-head tags. The style of the sub-head is defined separately in a single text file called the CSS file.
Whenever the browser sees a CSS tag around some text identifying it as a sub-head, it looks to the CSS file to find out how the text should be displayed. Rather than having to fix every occurrence of sub-head text when a design specification changes, a single change to the CSS file affects every instance of sub-head text across the site. You can imagine how happy that makes a web site developer!
CSS has been around for a long time, but how aggressively it has been utilized has been a factor of both browser compatibility and browser support. If you think about a typical web page, there lots of aspects with regard to display. There is type color, size, font and leading, column widths, and inline images with borders and margins. There are links and roll-overs, navigation bars with drop downs, form widgets, graphics used for bullets, complex table layouts, images that align with text, and images that float in columns next to text. For every one of these elements there are multiple aspects to consider. Text, for example, has size, color and font as you would expect, but also leading, margins, and paragraph attributes. There can easily be hundreds of CSS settings to define the way a web page looks.
Hello,i'm reading this comments and statements.They are very interesting.
The benefits I could think are
1) Less weight on websites.
2) Easy crawling by search engines.
3) Easy to modify in a single go.