1.3. HTMLWhile the World Wide Web Consortium (W3C) continues to refer to its document content markup effort (http://www.w3.org/DF/) as HTML, Version 4.01 of HTML (published in December 1999) may mark the end of a venerable sequence of recommendations to go by that four-letter acronym. Subsequent versions will likely be released as part of the XHTML effort (described in the next section). In the evolution of HTML and content delivery on the Web, however, the Version 4 family played a critical transitional role in the way authors regarded their content. Many of the features that were new to HTML 4 were designed for browsers that make the graphical user interface of a web page more accessible to users who cannot see a monitor or use a keyboard (see Section 1.7, later in this chapter). The new tags and attributes also acknowledge that a key component of the name World Wide Web is World. Users of all different written and spoken languages need equal access to the content of the Web. Thus, HTML 4 included support for the alphabets of most languages and provided the ability to specify that a page be rendered from right to left, rather than left to right, to accommodate languages that are written that way. Perhaps the most important long-term impact of HTML 4, however, was distancing a web page's content from its formatting. Strictly speaking, the purpose of HTML is to provide structural meaning to the content of pages. That's what each tag does: this blurb of text is a paragraph, another segment is labeled internally as an acronym, and a block over there is reserved for data loaded in from an external multimedia file. HTML 4 sought to wean authors from the familiar tags that make text larger, bold, and red, for example. That kind of information is formatting information, and it belongs to a separate standardization effort related to content style. In the HTML 4 world, a content author indicates that a chunk of text in a paragraph is to receive emphasis. The HTML standard, however, does not dictate whether the browser conveys emphasis through a bold or italic or green font. Instead, a separate style definition controls the formatting for an emphasized string of text. This separation of content and style allows the same content to be rendered differently for a variety of output devices. When the text is viewed in a browser on a video monitor, the color may be green and the style italic, but when the same page is viewed through a projection system, it may be a different shade of green, to compensate for the different ambient lighting conditions, and bold, so it is more readable at a distance. And when the content is being read aloud electronically for a blind user, the synthesized voice speaks the tagged words with more emphasis. The key point here is that the content—the words in this case—is written and tagged once. Style definitions, either in the same document or maintained in separate files that are linked into the document, can be modified and enhanced independently of the content. HTML 4 was also the first version of HTML to account for the role that client-side scripting was playing in the real world. Not only were <script> and <noscript> tags part of the specification, but most elements that get rendered on the page had a basic set of scripting event handler attributes explicitly defined for them (onclick, onmouseover, onkeypress, and the like). If nothing else, these acknowledgments validated the idea of client-side processing instructions delivered as part of the document. It also allowed HTML-validating programs to accept attributes that link elements to script actions. Internet Explorer 4 (for all operating-system platforms) was the first browser to provide a reasonably complete implementation of the HTML 4.0 recommendation. The depth of support improved significantly in IE 5, with Microsoft's IE 6 promotional information proclaiming complete HTML 4 compatibility. On the Netscape side, Navigator 4 included limited support for HTML 4 (the browser preceded the standard chronologically), whereas the new browser engine in Netscape 6 (and especially Netscape 6.2 and later) goes to great lengths to support the required elements and attributes. Copyright © 2003 O'Reilly & Associates. All rights reserved. |
|