Improve Site Performance Increase Site Traffic Monitor Site Uptime Webmaster Resources NetMechanic Home Looking For Help? Partner Programs Privacy Policy Contact Us Press Room
NetMechanic Home LOGIN | HELP | ABOUT US | PRODUCTS | SITE MAP
NetMechanic Menu
Over 52 Million Web Pages Tested!     
 

Search for:


Your Email:

I would like to receive my newsletter in:
HTML format
Text format



Volume 8 (2005)
   September
   June
   April
   March
   January

Volume 7 (2004)
   November
   September
   July
   June
   May
   April
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 6 (2003)
   December
   November (Part 2)
   November
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 5 (2002)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 4 (2001)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June (Part 2)
   June
   May (Part 2)
   May
   April (Part 2)
   April
   March (Part 2)
   March
   February (Part 2)
   February
   January (Part 2)
   January

Volume 3 (2000)
   December (Part 2)
   December
   November (Part 2)
   November
   October (Part 2)
   October
   September (Part 2)
   September
   August (Part 2)
   August
   July (Part 2)
   July
   June
   May
   April
   March
   February
   January

Volume 2 (1999)
   December
   November
   October
   September
   July
   June
   May
   April
   March
   February
   January

Volume 1 (1998)
   December
   November
   October
   September

 

Beginner Tip:
Do I Need DHTML?

by Larisa Thomason,
Senior Web Analyst,
NetMechanic, Inc.

  
October 2000
(Part 2)
Vol. 3, No. 14
 • Design Tip
 • Promotion Tip
 • Beginner Tip
  

Maybe. Dynamic HTML (DHTML) is overkill if you just want to include a simple image rollover on your page - like using a chainsaw to cut a tomato. However, DHTML may be for you if you need to develop special effects that don't require plug-ins.

Before you get started though, you must understand the basic principles of DHTML design.

What Makes HTML Code Dynamic?

Basic HTML defines the components of a Web page so the browser can display them. It was never meant to handle animations or interactivity, yet those are just the features that many Internet users now expect. DHTML is a response to the limitations of HTML.

Quite simply, DHTML is HTML that changes after the browser has loaded the Web page. Generally this is in response to actions by the user (onClick, onMouseOver, etc.). Dynamic effects range from simple popup windows to elaborate animations and special effects.

Components of DHTML

The term DHTML is a little misleading. It implies that there is a single magic characteristic that turns plain HTML into a DHTML page. Actually, DHTML is a combination of several different browser features that work together to make Web pages more dynamic and interactive.

You don't "learn DHTML" per se, but instead learn how to integrate these components into your page to make it dynamic.

  • HTML is the core of DHTML. You have to understand the basics before you ever even consider making your plain HTML dynamic. Check your HTML code for errors with NetMechanic's HTML Toolbox and correct them before they cause problems in your DHTML code.

  • Cascading Style Sheets (CSS): Plain HTML defines a document's structure, while CSS give you precise control over a document's presentation. They define the font, color, size, and display attributes of elements on the page. With DHTML, you use the CSS properties of a page element to change the element's display.

  • Document Object Model (DOM) takes the individual components of the HTML document and organizes them into a hierarchal structure of named objects. You must structure your HTML code to meet the DOM requirements before you can implement DHTML effects.

  • JavaScript is the most commonly used scripting language for creating DHTML effects. Since Netscape and Explorer implement DHTML differently, the first component of any DHTML application is usually a JavaScript browser detection script. JavaScript creates effects by accessing the components of the DOM and changing them on the Web page.

Advantages of DHTML

  • Quicker Downloads: DHTML files are much smaller than files for comparable effects created with multimedia programs like Shockwave and Flash.

    Small files = faster Web pages = happier visitors.

  • No Plug-ins Required: DHTML uses tools already recognized by most browsers so visitors don't have to download and install any special software to view your site's contents. This increases your site's usability level.

  • Increasing Popularity: The W3C is working on a final standards document for the DOM and has completed the standards document for CSS Positioning (CSS-P). Both Netscape and Explorer have promised to adhere to those standards once they are final. If they keep that promise, then cross-browser DHTML design will be much easier for developers to work with. Become familiar with the concepts now and you'll be one step ahead of other webmasters.

Disadvantages of DHTML

  • Incomplete support : Both Netscape and Explorer support CSS-P and the DOM, but apply it to HTML document elements using different tags. Many DHTML effects require a browser detection script and two completely different sets of code to make same effect display across browsers.

    In Explorer, dynamic objects are called styles and all elements on the page can be accessed and altered after the page loads.

    In Netscape 4.x, only objects contained in the LAYER tag can be changed dynamically. The Preview Release 1 version of Netscape 6.0 implemented DHTML in a way that broke existing DHTML code, so be sure to download the most recent Preview Release to test your DHTML.

    Remember that the WebTV browser provides very limited support for JavaScript. Avoid DHTML if you expect many WebTV subscribers to visit your site - or use a browser detection script to redirect visitors.

  • Learning Curve: Because DHTML is a combination of technologies, developers need to be proficient in HTML, CSS, and JavaScript. The learning curve can be steep. Many sites offer free DHTML scripts for download, but you need to be comfortable editing your own HTML code if you want to include them on your Web page.

    Use these free sites with caution. Lots of people include cut-and-paste JavaScript without problems, but it's more complicated with DHTML. Many of these scripts are on the leading edge of what the browsers support, so you're much more likely to have compatibility problems.

  • Expensive Tools: If the learning curve is just too steep for you, several companies offer editors that write DHTML code for you. Dreamweaver and Fusion are two of the most popular; you can create effects quickly with them, but the code they produce is often large and hard to edit by hand. Experiment with the free trial versions of their products before you buy.

DHTML is not for everyone, but it is growing in popularity, so seriously consider learning the basics. Experience with HTML, CSS, and JavaScript will make you a better webmaster, even if you never use that knowledge to create DHTML.



Rate This Tip:
Not Useful Useful Very Useful   
 
NetMechanic Tools
HTML Toolbox
Browser Photo
Server Check
Search Engine Starter
Search Engine Tools
GIFBot
Newsletter
HTML Tutorial and Tips
Search Engine Tutorial
Accessibility Information
Browser Problem Tutorial

Company Info
Products
About Us
Contact
Advertise
Link To Us
Jobs
Privacy Policy
Partner Programs
Press Room
RSS Feed
Support
 



Powered by Overture!

 
     
 
   
 
     


Keynote Home
Copyright © 1996-2007,
Keynote NetMechanic
All rights reserved.