HTML and CSS Reference
Object Model (DOM)
● Cascading Style Sheets (CSS). From previous chapters you already know that CSS
can be used to apply formatting styles to Web page elements, position elements
on a Web page, and even modify the visibility of elements. DHTML utilizes these
features of CSS.
VBScript, or JScript are used to access the DOM and manipulate the elements.
DHTML frequently has a long learning curve because of the extent of the knowledge
needed to combine the three technologies successfully. To further complicate matters,
the DOM is implemented differently by major versions of the major browsers. Recently,
there is better convergence between the DHTML implementations of modern browsers
and it should become easier to write cross-browser DHTML in the future.
Hiding and Showing Text. The appearance of text that describes anchor tags or
images is another common effect that uses DHTML.
Navigation. The horizontal navigation shown in Figure 11.18 utilizes DHTML. This nav-
igation type has become quite popular and is seen in both horizontal and vertical versions.
The lists of choices under each category (About USAID, Our Work, Locations, Policy,
and so on) appear and disappear as you move your mouse pointer over the category
heading. A good source of DHTML code, including navigation menus, is the Dynamic
Drive Web site at http://www.dynamicdrive.com.
Image Effects. Various image effects ranging from altering images to slide shows can
be applied with DHTML. For several examples of using DHTML to create a slide
show, visit http://dynamicdrive.com and search for “slide show.”
There are many available resources for DHTML on the Web. The following sites are