Dynamic HTML
Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts (JavaScript, VBScript, or any other supported scripts) that enabled the creation of interactive and animated documents. DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997. DHTML allows scripting languages, such as JavaScript, to modify variables and elements in a web page's structure, which in turn affect the look, behavior, and functionality of otherwise "static" HTML content after the page has been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load. By contrast, a dynamic web page is a broader concept, covering any web page generated differently for each user, load occurrence, or specific variable values. This includes pages created by client-side scripting and ones created by server-side scripting (such as PHP, Python, JSP or ASP.NET) where the web server generates content before sending it to the client. DHTML is the predecessor of Ajax and DHTML pages are still request/reload-based. Under the DHTML model, there may not be any interaction between the client and server after the page is loaded; all processing happens on the client side.…
Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts (JavaScript, VBScript, or any other supported scripts) that enabled the creation of interactive and animated documents. DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997. DHTML allows scripting languages, such as JavaScript, to modify variables and elements in a web page's structure, which in turn affect the look, behavior, and functionality of otherwise "static" HTML content after the page has been fully loaded and during the viewing process. Thus the dynamic characteristic of DHTML is the way it functions while a page is viewed, not in its ability to generate a unique page with each page load. By contrast, a dynamic web page is a broader concept, covering any web page generated differently for each user, load occurrence, or specific variable values. This includes pages created by client-side scripting and ones created by server-side scripting (such as PHP, Python, JSP or ASP.NET) where the web server generates content before sending it to the client. DHTML is the predecessor of Ajax and DHTML pages are still request/reload-based. Under the DHTML model, there may not be any interaction between the client and server after the page is loaded; all processing happens on the client side. By contrast, Ajax extends features of DHTML to allow the page to initiate network requests (or 'subrequest') to the server even after page load to perform additional actions. For example, if there are multiple tabs on a page, the pure DHTML approach would load the contents of all tabs and then dynamically display only the one that is active, while AJAX could load each tab only when it is really needed. DHTML example function init() { let myObj = document.getElementById("navigation"); // ... manipulate myObj } window.onload = init; Using a DOM function a { background-color: #eee; } a:hover { background: #ff0; } #toggleMe { background: #cfc; display: none; margin: 30px 0; padding: 1em; } Using a DOM function Show paragraph This is the paragraph that is only displayed on request. The general flow of the document continues. function changeDisplayState(displayElement, textElement) { if (displayElement.style.display === "none" || displayElement.style.display === "") { displayElement.style.display = "block"; textElement.innerHTML = "Hide paragraph"; } else { displayElement.style.display = "none"; textElement.innerHTML = "Show paragraph"; } } let displayElement = document.getElementById("toggle-me"); let textElement = document.getElementById("showhide"); textElement.addEventListener("click", function (event) { event.preventDefault(); changeDisplayState(displayElement, textElement); }); ==Document Object Model== DHTML is not a technology in and of itself; rather, it is the product of three related and complementary technologies: HTML, Cascading Style Sheets (CSS), and JavaScript. To allow scripts and components to access features of HTML and CSS, the contents of the document are represented as objects in a programming model known as the Document Object Model (DOM). The DOM API is the foundation of DHTML, providing a structured interface that allows access and manipulation of virtually anything in the document. The HTML elements in the document are available as a hierarchical tree of individual objects, making it possible to examine and modify an element and its attributes by reading and setting properties and by calling methods. The text between elements is also available through DOM properties and methods. The DOM also provides access to user actions such as pressing a key and clicking the mouse. It is possible to intercept and process these and other events by creating event handler functions and routines. The event handler receives control each time a given event occurs and can carry out any appropriate action, including using the DOM to change the document. ==Dynamic styles== Dynamic styles are a key feature of DHTML. By using CSS, one can quickly change the appearance and formatting of elements in a document without adding or removing elements. This helps keep documents small and the scripts that manipulate the document fast. The object model provides programmatic access to styles. This means you can change inline styles on individual elements and change style rules using simple JavaScript programming. Inline styles are CSS style assignments that have been applied to an element using the style attribute. You can examine and set these styles by retrieving the style object for an individual element. For example, to highlight the text in a heading when the user moves the mouse pointer over it, you can use the style object to enlarge the font and change its color, as shown in the following simple example. Dynamic Styles ul { display: none; } Welcome to Dynamic HTML Dynamic styles are a key feature of DHTML. Change the color, size, and typeface of text Show and hide text And much, much more We've only just begun! function showMe() { document.getElementById("first-header").style.color = "#990000"; document.getElementById("unordered-list").style.display = "block"; } document.getElementById("clickable-link").addEventListener("click", function (event) { event.preventDefault(); showMe(); }); ==See also== Dynamic web page ==References==
References
- Document Object Model FAQ · retrieved 2026-02-15 · rev 1361214276
Cite this reference
MLA "Document Object Model FAQ." 2026-02-15. https://www.w3.org/DOM/faq.html#DHTML-DOM. Accessed 24 November 2026.
Chicago "Document Object Model FAQ." 2026-02-15. https://www.w3.org/DOM/faq.html#DHTML-DOM.
APA encyclopegia.org. (2026). Document Object Model FAQ. Retrieved November 24, 2026, from https://www.w3.org/DOM/faq.html#DHTML-DOM
- Web Style Sheets · retrieved 2026-11-18 · rev 1361214276
Cite this reference
MLA "Web Style Sheets." 2026-11-18. http://www.w3.org/Style/#dynamic. Accessed 24 November 2026.
Chicago "Web Style Sheets." 2026-11-18. http://www.w3.org/Style/#dynamic.
APA encyclopegia.org. (2026). Web Style Sheets. Retrieved November 24, 2026, from http://www.w3.org/Style/#dynamic
- A Quick Glance of DHTML with Components, Features, Need · retrieved 2026-06-12 · rev 1361214276
Cite this reference
MLA "A Quick Glance of DHTML with Components, Features, Need." Pedamkar, Priya (2020-07-19). 2026-06-12. https://www.educba.com/dhtml/. Accessed 24 November 2026.
Chicago "A Quick Glance of DHTML with Components, Features, Need." Pedamkar, Priya (2020-07-19). 2026-06-12. https://www.educba.com/dhtml/.
APA Pedamkar, Priya (2020-07-19). (2026). A Quick Glance of DHTML with Components, Features, Need. Retrieved November 24, 2026, from https://www.educba.com/dhtml/
- Fun and Games With DHTML · retrieved 2022-08-26 · rev 1361214276
Cite this reference
MLA "Fun and Games With DHTML." Downes, Stephen (Aug 18, 1999). 2022-08-26. https://www.downes.ca/post/276. Accessed 24 November 2026.
Chicago "Fun and Games With DHTML." Downes, Stephen (Aug 18, 1999). 2022-08-26. https://www.downes.ca/post/276.
APA Downes, Stephen (Aug 18, 1999). (2022). Fun and Games With DHTML. Retrieved November 24, 2026, from https://www.downes.ca/post/276
- Ferguson, Russ; Heilmann, Christian (2013). Beginning JavaScript with DOM Scripting and Ajax (PDF) . Berkeley, CA: Apress. pp. 49– 68. doi : 10.1007/978-1-4302-5093-7 . ISBN 978-1-4302-5092-0 . S2CID 20526670 . Retrieved May 30, 2022 . Wikipedia revision 1361214276, retrieved 2026-11-19 · retrieved 2026-11-18 · rev 1361214276
Cite this reference
MLA "Ferguson, Russ; Heilmann, Christian (2013). Beginning JavaScript with DOM Scripting and Ajax (PDF) . Berkeley, CA: Apress. pp. 49– 68. doi : 10.1007/978-1-4302-5093-7 . ISBN 978-1-4302-5092-0 . S2CID 20526670 . Retrieved May 30, 2022 . Wikipedia revision 1361214276, retrieved 2026-11-19." Ferguson, Russ; Heilmann, Christian (2013). 2026-11-18. https://link-springer-com.huaryu.kl.oakland.edu/content/pdf/10.1007/978-1-4302-5093-7.pdf. Accessed 24 November 2026.
Chicago "Ferguson, Russ; Heilmann, Christian (2013). Beginning JavaScript with DOM Scripting and Ajax (PDF) . Berkeley, CA: Apress. pp. 49– 68. doi : 10.1007/978-1-4302-5093-7 . ISBN 978-1-4302-5092-0 . S2CID 20526670 . Retrieved May 30, 2022 . Wikipedia revision 1361214276, retrieved 2026-11-19." Ferguson, Russ; Heilmann, Christian (2013). 2026-11-18. https://link-springer-com.huaryu.kl.oakland.edu/content/pdf/10.1007/978-1-4302-5093-7.pdf.
APA Ferguson, Russ; Heilmann, Christian (2013). (2026). Ferguson, Russ; Heilmann, Christian (2013). Beginning JavaScript with DOM Scripting and Ajax (PDF) . Berkeley, CA: Apress. pp. 49– 68. doi : 10.1007/978-1-4302-5093-7 . ISBN 978-1-4302-5092-0 . S2CID 20526670 . Retrieved May 30, 2022 . Wikipedia revision 1361214276, retrieved 2026-11-19. Retrieved November 24, 2026, from https://link-springer-com.huaryu.kl.oakland.edu/content/pdf/10.1007/978-1-4302-5093-7.pdf
Cite this article
MLA
"Dynamic HTML." encyclopegia.org, 2026, https://encyclopegia.org/wiki/dynamic-html. Accessed 24 November 2026.
Chicago
"Dynamic HTML." encyclopegia.org. Accessed November 24, 2026. https://encyclopegia.org/wiki/dynamic-html.
APA
encyclopegia.org. (2026). Dynamic HTML. Retrieved November 24, 2026, from https://encyclopegia.org/wiki/dynamic-html
Accessed November 24, 2026 · CC BY-SA 4.0 · citation page · JSON