Web Page Design: Dynamic HTML 01

Dynamic HTML

For a good reference work on this topic, consider DHTML for the World Wide Web, by Jason Cranford Teague (Visual QuickStart Guide, Peachpit Press, 1998); or Dynamic HTML: The Definitive Reference, by Danny Goodman (O'Reilly, 1998).

Dynamic HTML is a term used to mean a variety of things. It usually refers to a series of technologies introduced by both Netscape and Microsoft in their 4.0 browsers. It usually means writing an HTML page such that the page content is generated 'on-the-fly'. Typically these things apply:

Types of DHTML

The DHTML technologies that run well using both Netscape and Internet Explorer browsers are only these three:

  1. Cascading Style sheets (CSS), Level 1: Allows you to define how HTML tags should display their content (already covered.)
  2. JavaScript 1.2: Allows you to create simple code to control the behavior of Web page elements. (Covered in the following pages.)
  3. Cascading Style Sheets - Positioning: Allows you to exactly position HTML elements anywhere in the window, as well as control the visibility of those elements.

Netscape-Specific DHTML

  1. JavaScript Style Sheets (JSS): Allows you to define how HTML tags display their content, but uses a JavaScript syntax.
  2. Layers: Like CSS-P: Allows you to control the position of elements on the screen and their visibility.

Microsoft-Specific DHTML

  1. Visual Filters: Let you create visual effects on graphics and text.
  2. Dynamic CSS: Allows you to change the positions of elements on the screen, as well as their visual appearance.
Note: All of these technologies are pretty much limited to IE and Netscape versions 4.0 and above.

These technologies are unlikely to become standards because CSS does most of the same things and is endorsed by the W3C.

JavaScript

JavaScript has been around for a while and is accepted as the standard method of adding functionality to Web pages. It's a scripting language that allows you to give instructions to you Web page about how to behave when certain things take place on the screen. It allows you to move elements on the screen, cause them to appear or disappear, and change their appearance.

Examples include a web page that adapts itself to a user's particular browser, the familiar 'mouse-over' image manipulation, form field checking, status line scrolls, and so on.

This can be done on a server using server-side programming, via CGI programming, or by writing a script in an HTML document. The script may be a common scripting language, such a Visual Basic or JavaScript. The focus on this section will be to introduce you to simple JavaScript by way of examples.

Note: When people refer to server-side scripting, they usually mean CGI scripts, since they are run on the server. When they refer to client-side scripting, they usually mean JavaScripts.

Go on to next segment Go to Contents