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 p> ... 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.