Internet
Fact-checked

At EasyTechJunkie, we're committed to delivering accurate, trustworthy information. Our expert-authored content is rigorously fact-checked and sourced from credible authorities. Discover how we uphold the highest standards in providing you with reliable knowledge.

Learn more...

What is Dynamic HTML?

Alex Paul
Alex Paul

Dynamic HTML, more commonly known as DOM scripting or DHTML, is a set of tools that can be used to create interactive elements on a website. Typically, dynamic HTML combines standard HTML, which is the markup language of the web, with a scripting language. This allows the website designer to include variable elements to a webpage that can be changed by the user after the page has loaded. An example of dynamic HTML is a menu that drops down when the user hovers over it. DHTML games are also becoming more popular.

Websites built from static HTML cannot be changed or edited by the user once loaded. For basic websites this isn’t a problem, but the lack of interactivity is an issue for many websites and applications. Dynamic HTML combines regular HTML with JavaScript, a simple scripting language, to provide much greater freedom to the web designer through interactive elements.

Dynamic HTML combines regular HTML with JavaScript to provide much greater freedom to the web designer through interactive elements.
Dynamic HTML combines regular HTML with JavaScript to provide much greater freedom to the web designer through interactive elements.

Standard HTML doesn't have “variables” which can be changed, but dynamic HTML does. Once a website with DHTML has loaded, the scripting language can be used to change certain elements of the page. It cannot, however, create pages with dynamically generated content. For this, the web designer must use server side scripting languages such as PHP and Perl.

DHTML allows the website designer to include variable elements to a webpage that can be changed by the user after the page has loaded.
DHTML allows the website designer to include variable elements to a webpage that can be changed by the user after the page has loaded.

Originally, dynamic HTML was known as DHTML. Due to initial problems with getting the technology to work on all internet browsers, this label has fallen out of fashion. Instead, the technology is now usually referred to as DOM scripting which stands for Document Object Model scripting. This provides a set of conventions that work across all browsers, and makes developing dynamically animated web pages much easier.

There are a number of common examples of dynamic HTML in action. Aside from drop down menus, forms which can return information without needing to be sent to a server and automatically updating content are two other examples. These would be very difficult, or impossible, to achieve using standard HTML and a server side scripting language. Hiding content from a user until a specific action has taken place is another common use of the technology.

The development of dynamic HTML games is becoming less difficult now that cross-browser issues are starting to pose less of rare. DOM scripting games are still relatively rare, but the technology works well for small browser based games. An advantage to DHTML games is that they can also be run popular operating systems as widgets.

Discuss this Article

Post your comments
Login:
Forgot password?
Register:
    • Dynamic HTML combines regular HTML with JavaScript to provide much greater freedom to the web designer through interactive elements.
      By: spaxiax
      Dynamic HTML combines regular HTML with JavaScript to provide much greater freedom to the web designer through interactive elements.
    • DHTML allows the website designer to include variable elements to a webpage that can be changed by the user after the page has loaded.
      By: Dmitry Strizhakov
      DHTML allows the website designer to include variable elements to a webpage that can be changed by the user after the page has loaded.