Understand Content Versus Presentation


Now that you have practiced working with text elements, you are ready to add style. You might be wondering how to do that, particularly since the W3C discourages the use of elements and attributes related to presentation. For example, the <font> element, used widely to control font color and size, is one of many elements and attributes that have been officially deprecated by the W3C. Because the word “deprecate” literally means to express disapproval for something, you might wonder why the W3C is expressing disapproval for its own HTML elements. To understand the answer to this question, you must learn a bit of HTML history.

HTML Originally Defined Structure

When Tim Berners-Lee developed HTML in 1989, the Internet was a very different place. It was used mostly by the government and universities and existed primarily for the exchange of scientific or scholarly information. The material transmitted was documentary and looked more like term papers than Web pages. In other words, when HTML was created the main concern was document content. HTML served to identify the different parts of a page’s content. For example, the <h1> through <h6> elements defined heading levels one through six. The paragraph element defined a paragraph, the list element a list, and so on. Thus, in early HTML documents structure was everything; however, the arrival of the World Wide Web and graphical Web browsers changed all that.

HTML Extended to Address Presentation Issues

When the Web came on the scene, the academic world of HTML became a world of color, pictures, and design almost overnight. Prior to this, a document’s layout was virtually a nonissue. But advances in graphics moved presentation to the front. This created a problem. Because HTML was never intended to deal with design issues, Web page authors found themselves struggling with questions of how to create pleasing designs while maintaining some control over how their documents appeared when viewed online. Because HTML didn’t provide the tools they needed, they developed “workarounds,” applying HTML markup in ways its authors never intended. Eventually, browser companies Microsoft and Netscape extended HTML to include “proprietary” elements, supported only by their browsers. Some of these, such as frames and tables, were later incorporated into the official HTML recommendation. Thus, over time HTML was nudged away from its original purpose and into the design arena. Unfortunately, HTML’s inherent limitations make it a very inadequate design tool. That’s where Cascading Style Sheets enter the picture.




How to Do Everything with HTML & XHTML
How to Do Everything with HTML & XHTML
ISBN: 0072231297
EAN: 2147483647
Year: 2003
Pages: 126

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net