Dynamic HTML

The terms DHTML, Dynamic HTML ( engl. dynamic HTML ) or DOM scripting designate certain web design methods, in which during the display of a web page it is itself triggered by user input, changed.

The term "dynamic" refers to the idea that these changes are caused by events that may occur when viewing a page multiple times.

Examples of dynamic display effects are

  • The appearance ( " unfolding " ) of a menu
  • The highlighting of a text
  • The ability to move objects by dragging and dropping on the screen
  • To form fields occupy automatically depending on other fields
  • Websites, which can be operated as a client side application programs.


Dynamic HTML includes the following techniques:

  • HTML to compose documents
  • An interface to the amendment and extension of the HTML document, today is used mainly the Document Object Model (DOM)
  • XMLHttpRequest to exchange data between the browser and a remote HTTP server (see also Ajax).
  • A format for transfer of structured data, such as XML or JSON

It do not necessarily have all the techniques in this list are used in a document (especially for data transmission after the first store did not ) in order to designate it as an application of dynamic HTML can.


A simple example of a dynamic HTML portion where the text shown changed when clicked:


Click me ... Criticism and disadvantages

Often dynamic HTML for effect - oriented functions is used in which the benefits are not clear and disrupt the more.

In the early days DHTML could only be realized through browser - specific so-called DHTML models that were not compatible with each other. Therefore, some DHTML pages resulted in certain browsers to errors. This reputation depends dynamic HTML to this day. Therefore, today the term DOM scripting is used, with which you want to define standards compliant browser DHTML - specific variants.

Dynamic HTML provides some high demands on the JavaScript capabilities of the browser that will be settled only by the newer generation of browsers. If the use of JavaScript is disabled for security reasons, dynamic HTML can not be used. In addition, the accessibility may worsen for users who need to resort to alternative input and output methods because of physical limitations (see Accessible Internet ). But it is possible to use dynamic HTML such that it is only used for browsers that can handle it. The other users can then use the site as if they would use no dynamic HTML. Search engines can not use and misuse no longer find all the contents of dynamic HTML page.