About IR
Editors
Author instructions
Copyright
 
Author index
Subject index
Search
 
Reviews
 
Register
Home
 
Valid XHTML 1.0!
       

Jason Cranford Teague DHTML for the World Wide Web. Berkeley, CA: Peachpit Press, 1998. viii, 248 pp. ISBN 0-201-35341-5 $17.95 (Visual Quickstart Guide series)

Jason Cranford Teague is well known on this side of the Atlantic for his excellent column in The Independent's Monday morning computing supplement, which I discovered some time ago. Two features of the column appeal: first, when a tutorial mode is adopted, the explanations are clear and straightforward; secondly, when Teague is commenting on a development in the news, the comments are always timely and pertinent and interesting. It is not surprising, therefore, to find that he has written an eminently accessible text on DHTML.

The author's straightforwardness is signalled in the Introduction when he tells us:

'I'll let you in on a little secret: There really isn't a DHTML. At least, not in the way that there is an HTML or a Javascript... Dynamic HTML... is a marketing term coined by both Netscape and Microsoft to describe a series of technologies introduced in the 4.0 versions of their Web browsers, to enhance the "dynamic" capabilities of those browsers.'

The particular point here is that DHTML actually consists of Cascading Style Sheets (CSS) and Javascript and Netscape and Microsoft have browsers that offer variations on both of these. However, both Netscape Navigator 4.x and Internet Explorer 4.x enable the use of CSS, Javascript, and CSS-Positioning (which, as the name suggests, enables the positioning of HTML elements within a window). Sensibly and usefully, Teaque restricts his coverage of DTML to those features that are common to both version 4.0 browsers. Consequently, anything you produce as a result of following his instructions is likely to work - provided that your reader has the appropriate browser.

The idea of a 'style' will be understood by anyone who has used a modern word-processor: in Word, for example, the text style and heading styles are defined by the .dot file used by a document - usually 'normal.dot' unless you have defined another. If you indicate that a particular line of text is a heading at a particular level, it will automatically be set in the type-face and emphasis (e.g., bold or italic) defined by the style. CSS follow the same principle: elements of a Web page are defined once in the Head of the page and those definitions apply throughout. So, the <P> tag is defined to produce the indented first line in a sans-serif type-face - as you see here (unless you have set your browser to use your own custom-selected type-face).

The book has a logical sequence: we are first introduced to the basics of Cascading Style Sheets, with information on rules, selectors, and tags; then to the control of fonts (family, size, style) and the control of text (letter spacing, leading, vertical alignment, indenting, etc.). As a result of the information derived from these chapters, the next paragraph should look rather different from what has gone before (but only if you have the appropriate browser).

If this works you should see a different point-size for the justified text, because of a 'style' instruction nested in the <P> tag. The lines should also look closer together, as the line-height has been set to be only one point larger than the font-size. You will also notice that this paragraph, unlike the rest, is not indented. The type family is the same as the rest of the text because it has been set by a style instruction in the HEAD of the HTML page. The quotation a couple of paragraphs above was also given a different style by defining the <BLOCKQUOTE> tag in the head of the page.  In other words, styles may be defined in the head, to cover all occurrences of a tag in a document, or they may be defined at the tag level within a document, if you wish, for any reason, to change the appearance of a particular element. They may also be defined in a file external to any individual page and so used on any document in an entire site.

The statement in the <P> tag that achieved all that was "FONT-SIZE: 11pt; LINE-HEIGHT: 12pt; MARGIN-LEFT: 12%; MARGIN-RIGHT: 12%; POSITION: relative; TEXT-ALIGN: justify; TEXT-INDENT: 0px". Now that we have left that 'custom-styled' paragraph, we are back into the style defined in the HEAD and can continue to use that style to the end of the document, unless we find a need to define a different paragraph style for any particular reason.

After setting out the basics (and the bells and whistles) of CSS, Teague moves on, in Chapter 8, to everyday design issues, noting:

...CSS is still a relatively new design tool, and designers are still discovering its abilities and limitations. In addition, many designers are initially captivated by the "gee-whiz" aspects of using CSS to create Dynamic HTML. They overlook some of the nuts-and-bolts issues that are solved by CSS itself, to facilitate solid, compelling page layout on the Web.

So, Teague shows us how to create headlines with graphic backgrounds, side bars, drop caps (which this para. would have had, if the feature worked in Internet Explorer 4.0 - but it doesn't), title bars, drop shadows, columns, and more. This is a very useful chapter and the author provides a fund of useful advice on using these features. The columns feature is particularly useful since, as any page designer will know, before CSS the only way to achieve columns was through the use of tables, which were never intended as a graphic design feature and present considerable problems if you are designing a complex page. However, as Teague notes, the browsers are not particularly well set-up to handle columns and I failed to find a satisfactory way of making them work in IE 4.0: I could produce columns, but their appearance on the browser page left a lot to be desired.

The reader might argue that there is little here that is 'dynamic' - true: dynamic HTML using CSS requires the use of Javascript and a Document Object Model (DOM), which the author discusses in the rest of the book, paying particular attention to the vagaries caused by Netscape and Microsoft using different DOMs and different versions of Javascript. At this point the reader requires a knowledge of Javascript to make full use of the ideas presented. Teague does not attempt to write a Javascript primer within this book and you will need to look at one of the books reviewed earlier on this site before attempting to put the ideas into practice.

This is a useful introduction to dynamic HTML, with a lot of good advice on what to avoid if you want your pages to be read by any browser. If you believe that most people will not have access to the 4.0 versions of IE and Netscape Communicator then it will be best to avoid CSS and dynamic HTML altogether. At the moment, the ideas are probably best applied in company intranets where the desktop machines and their software are under the control of an IT division.

The book is attractively produced and well organized, although I found that the font-size of the examples was rather too small and too 'thin' for comfort. This was necessary in order to get code, example and instruction on to (usually) the same page but working with a larger font-size for the examples on a two-page spread would have made the book much more user-friendly; but also bigger and more expensive. We have here a little inversion of the normal situation - one in which the principles of good screen design ought to have been applied more rigorously to the book!

As is often the case with computing texts these days, a Web-site is available at: http://www.webbedenvironments.com/dhtml/ where you will find updates and corrections (for example, for the missing page references to the instructions on page 17) and a publisher's page at: http://www.peachpit.com/vqs/DHTML - both of which were working when I wrote this review, but carrying only a page of corrections: there may be more now.


Prof. Tom Wilson
Publisher/Editor-in-Chief
29 December 1998