DHTML


DHTML is an acronym for Dynamic HTML. DHTML combines all the elements you've already learned (HTML, style sheets, and scripting) to create Web pages that are interactive and easy to update. Unfortunately, Microsoft, Netscape, and the World Wide Web Consortium (W3C) all disagree on how to accomplish this feat. The W3C doesn't even list the acronym on its Web site when discussing HTML standards.

Tip

See what Microsoft has to say about DHTML at http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/dhtml.asp.

You can find Netscape's description at http://archive.devx.com/dhtml/articles/sl011701/sl011701.asp.


Microsoft and Netscape do agree that DHTML should enable you to alter the appearance of a Web page after it has been loaded in the browser. They also agree that DHTML should enable developers to position any HTML element on a page. The elements can even be positioned in the same location so that, in effect, the elements appear on top of each other, but that's where the agreement ends.

Microsoft and Netscape have each developed their own browser-specific codes to achieve this type of interactivity. Using Microsoft's coding standards means that Netscape viewers might not be able to see the dynamic elements. The same is true if you use Netscape's coding standards. This diversity means that developers are forced to choose either to ignore a whole subset of their users, or to double-code all their pages to ensure that doesn't happen.

The most popular use of DHTML on the Internet is in navigational menus. You've seen it in action even if you didn't recognize it. When you hover over a menu name and a list of submenus appears, the menu was probably generated using DHTML. One of my favorite examples (shown in Figure 14.1) includes images as well as text links in the submenus.

Figure 14.1. This Web site uses style sheets, absolute positioning, and JavaScript to dynamically alter the page.


Tip

You can find plenty of information and coding examples online at http://www.DynamicDrive.com.




Sams Teach Yourself HTML in 10 Minutes
Sams Teach Yourself HTML in 10 Minutes (4th Edition)
ISBN: 067232878X
EAN: 2147483647
Year: 2004
Pages: 151
Authors: Deidre Hayes

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