WebDevelopersJournal.comTips on Web Page Design, HTML and Graphics
SITE SEARCH
Newsletters
HTML (M-F) Text (M,TH)



Jobs at webdeveloper.com

Resources By Subject
Technical
Graphical
Authoring
Business
WDJ resources
Archive

internet.com

internet.commerce
  • Partner With Us
















Developer Channel


Find a web host with:
CGI Access DB Support Telnet Access
NT Servers UNIX Servers



Semi-automatic?

JavaScript
JavaScript Helper:
Meet Paige Turner, the least geeky geek we've ever come across.

Variables and Operators Explained:
First of a three part guide to JavaScript basics.

Controlling Forms:
Enhance your HTML forms with a touch of JS.

DHTML:
Forget how it works, let's see some in action!


Dynamic HTML - So Near and Yet So Far

by Charlie Morris

PERPEND

Say the words "Dynamic HTML" to a Web developer and see what you get. A sniff, an eye-rolling, a sad shake of the head? Dynamic HTML is one of the most promising Web technologies ever, and offers a key to the shackles of a linear markup language that designers have had to bear for so long. At the same time, it is one of the most disappointing, frustrating subjects ever, as it is currently being held hostage to a senseless, fratricidal arms race, and no one seems to know when we'll actually be able to use this wonderful new tool.
November 1997

Dynamic HTML is not synonymous with HTML 4.0. The "dynamic" features are only part of HTML 4.0, and some of what is being called Dynamic HTML involves non-standard tags that go beyond the official HTML 4.0 specification. What we mean by Dynamic HTML is this: On a traditional Web page, every element is static. That is, it is loaded once by the browser and then just sits there until the user loads it again. A dynamic element is one that can change in response to instructions of some sort, without reloading the page. The new HTML tools allow one to specify any element, be it text, graphics, a link or whatever, as a unit, or an object if you like. Since that element has a name and an identity of its own, it can now be manipulated by a script.

Big deal, right? So you can make a gif that the user can chase around the page with his mouse. Actually, you can do far more than that, but let's cut to the chase and look at two important capabilities that Web designers have been pining for for years.

Dynamic HTML allows you to position elements precisely where you want them on a page, down to the pixel, and even allows layering of objects. This, of course, takes Web page design into a whole new realm. The key is the <DIV> tag. This allows you to select any section of a document, and give it a name. You can then specify the x, y and z coordinates for each named section (or object). Plain-water functionality for desktop publishers, but heady wine indeed for HTML designers.

Another major aspect of Dynamic HTML, and some would say the heart of the beast, is Cascading Style Sheets, or CSS. As the name implies, these allow you to create a style sheet which can apply to a whole document, or several documents. Styles can be applied to any tag, for example you could specify H2 as yellow size 5 verdana, or black size 5 Times (You might not win any prizes for typography, but you could). The advantages are obvious. Not only will CSS improve document consistency, and make global changes much easier, it will change the way designers think about tags. Since all the details, such as font face, size and so on are specified in the style sheet, and since surfers can also create their own style sheets, designers will have to get used to specifying an element's function in the document, rather than its presentation. In other words, dynamic HTML documents will work better if you designate elements as headings, subheadings, body text, etc. rather than as bold size 4, plain size 3, italic size 2, etc. Ironically, this is closer to what the original creators of HTML had in mind.

But before you reach out to grasp this Holy Grail, and start redesigning all your pages, be advised of two tiny details. The first is that dynamic HTML is not backward-compatible. Your precisely-designed pages, that look so grand in Netscape 4.0, will just be a jumbled mess in 3.0 or anything earlier. This was to be expected, and was probably unavoidable. We'll just have to hack out workarounds, and possibly even maintain parallel pages, until the older browsers fade from the scene. The next minor catch is a bit stickier. It seems that the wonderful, beloved dynamic HTML will not work correctly on either Netscape Communicator 4.0 or MS Explorer 4.0. In fact, neither of these callow browsers work very well, period. Anyone care to develop a third browser alternative?

Communicator and Explorer implement HTML 4.0 so differently that Wrox Press found it necessary to publish two completely different editions of their new dynamic HTML book, one for each browser. Neither browser implements all the new goodies available, and both have created their own tags that will not work with the other. Both are buggy, and the word on the cyberstreet is that at this moment, trying to develop pages using dynamic HTML is a complex process at best. It is possible to create a workaround, using Javascript, that detects a user's browser type and adjusts accordingly.

Why did the two biggest browser makers both release such inadequate products, and set off this flurry of irate columns? It's not even April. No one knows what goes on in the hallowed boardrooms and think tanks in Latte-land, but it seems apparent that, as usual, the problem is not technical but political.

Microsoft's strategy is of course to dominate every single software category that exists or may someday exist anywhere in the Universe, from nuclear-missile-targeting software to design-your-own-greeting-card packages. As soon as Netscape grew big enough to be worth crossing swords with, Microsoft shouted "en garde!" Netscape would have been foolish to ignore the entry of such a powerful competitor into their market, and the Browser Wars began.

"Ah!" writes reader Adam Smith, "But isn't this a good thing? Fierce competition like this should result in more features and lower prices for consumers! What's the problem?" The problem is that both sides seem to have made a very specious assumption: That the key to victory is to release each new version of the product before the other guy does, and who cares whether it works or not.

I predict that version 4.0 of both products will be short-lived, and will eventually be cited in marketing textbooks as examples of what not to do. Will Netscape or Microsoft lose any money as a result of this monumental mess? No such luck. They're the only two games in town, so all we can do is write columns like this and wait for them to release the next version. When they do, let us hope that they forget trying to screw each other for a while, and think about pleasing their customers instead. May we please have two browsers that are reasonably stable, support all of HMTL 4.0, and do not introduce new proprietary tags that will not be supported?

In the meantime, we at the Web Developer's Journal will be covering books and other material about dynamic HTML as it comes out. Wrox Press has a very good book called Instant Dynamic HTML, available in both Netscape and IE4 editions. Click to read our review. As with all our book reviews, we provide a link for you to skip over to Amazon.com and order it online if you like.

We have also received two cinder-block-size HTML 4.0 textbooks from Sybex Publishing, and you will see reviews of them in The Web Developer's Journal soon.

Suits PonytailsPropheadsContact WDJDiscussWeb AudioSearch

internet.comearthweb.comDevx.commediabistro.comGraphics.com

Search:

Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

Jupitermedia Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers