Dynamic HTML

from Wikipedia, the free encyclopedia

The terms DHTML , dynamic HTML ( English dynamic HTML ) or DOM scripting designate certain web design methods in which the website itself is changed during the display, triggered by user input.

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

Examples of dynamic display effects are:

  • the appearance ("unfolding") of a menu
  • highlighting a text
  • the ability to drag and drop objects around the screen
  • Automatically fill form fields depending on other fields
  • Websites that can be operated like client-side application programs .

history

The scripting languages JavaScript in Netscape Navigator and JScript in Microsoft Internet Explorer made it possible to change websites based on events as early as the mid- 1990s . At that time the term DHTML was used to refer to these capabilities of the program versions of that time. With the standardization of the Document Object Model and the bursting of the dot-com bubble at the time , the term went out of fashion.

techniques

Dynamic HTML includes the following techniques:

Not all of the techniques in this list have to be used in a document (especially those for data transfer after the first loading) in order to be able to describe it as an application of dynamic HTML.

Examples

A simple example of a dynamic HTML section in which the displayed text changes when clicked:

...
<p onclick="this.firstChild.nodeValue = 'Danke'">Klick mich</p>
...

Criticism and cons

Dynamic HTML is often used for effect-oriented functions where the benefits are not clearly recognizable and which tend to be annoying.

In the early days, DHTML could only be implemented using browser- specific so-called DHTML models that were not mutually compatible. As a result, some DHTML pages produced errors on certain browsers. That reputation rests with dynamic HTML to this day. Therefore, the term DOM scripting is used today, with which one would like to distinguish standard-compliant DHTML from browser-specific variants.

Dynamic HTML places high demands on the browser's JavaScript capabilities, which are only met by the newer browser generations. When using JavaScript, e.g. If it is deactivated, e.g. for security reasons, dynamic HTML cannot be used. In addition, the accessibility for users who have to resort to alternative input or output methods due to physical limitations can deteriorate (see Accessible Internet ). However, it is possible to use dynamic HTML in such a way that it is only used in browsers that can handle it. The other users can then use the website as if it were not using dynamic HTML at all.

Web links