Dynamic HTML
Encyclopedia : D : DY : DYN : Dynamic HTML
Dynamic HTML or DHTML is a method of creating interactive web sites by using a combination of static markup language (such as HTML), a client-side scripting language (such as JavaScript), the presentation definition language (e.g. Cascading Style Sheets [CSS]), and the Document Object Model. Some disadvantages of DHTML are that it is difficult to develop and debug due to varying degrees of support among web browsers of the aforementioned technologies and that the variety of screen sizes means the end look can only be fine-tuned on a limited number of browser and screen-size combinations. Development for recent browsers, such as Internet Explorer 5.0+, Netscape 6.0+, and Opera 7.0+, is aided by a shared Document Object Model.
Like LAMP, SPA, or Ajax, DHTML is not a technology in itself, but a term that refers to the use of a group of technologies together.
Though the term "dynamic web page" can refer to any specific web page that is generated differently for each user, load occurrence, or per specific variable values, those pages with this type of "dynamic" content should not be confused for DHTML. Web pages with this type of dynamic content, though still dynamic web pages, are a result of either server-side scripting (such as PHP), which generates unique content prior to sending the page to the visitor; or as a result of client-side scripting that is run immediately upon page load, before the static page content is visually generated. DHTML, as described above, is a term specifically reserved for those pages which utilize client-side scripting to effect changes in variables of the presentation definition language, which in turn affect the look and function of otherwise "static" HTML page content, after the page has been fully loaded and during the viewing process. In effect, the dynamic characteristic of DHTML is found in how it acts and functions as each page is being viewed, not in its ability to generate a unique page with each specific page load.
Structure of a web page
Typically a web page using DHTML is set up the following wayOften the JavaScript code is stored in an external file; this is done by linking the file that contains the JavaScript. This is helpful when several pages use the same script:DHTML example
See also DOM Events
Example: Displaying an additional block of text
The following code illustrates an often used function. An additional part of a web page will only be displayed if the user requests it. In e-learning, such a function could be used to display additional hints or an answer the student initially should not see.Test How to use a DOM function
Show exampleThis is the example. (Additional information, which is only displayed on request)..............The general text continues ....
External links
Tutorials and Reference
- [QuirksMode], a comprehensive site with test examples and instructions on how to write DHTML code which runs on several browsers.
- [Introductory DHTML Tutorial] for those taking their first steps in DHTML.
- [HTML & DHTML Reference on MSDN]
Libraries and Scripts
- [Yahoo! UI Library], a fully-featured DHTML library that supports animation, XMLHTTP and graphical interface widgets.
- [DHTML Central], a web site with a DHTML library and several javascript components for menus, trees, and a library for simplifying cross-browser DHTML programming.
- [Dynamic Drive], a collection of free scripts that you can actually try the effect/script online and then cut and paste the script.
- [DHTML Goodies], A library of nice looking DHTML scripts.
- [DHTML Demos], DHTML interactive demos and experiments.
From Wikipedia, the Free Encyclopedia. Original article here. Support Wikipedia by contributing or donating.
All text is available under the terms of the GNU Free Documentation License See Wikipedia Copyrights for details.
