Difference between HTML and DHTML
- HTML is a markup language while DHTML is a collection of technologies.
- HTML is used to create static webpages while DHTML is capable of creating dynamic webpages.
- DHTML is used to create animations and dynamic menus but HTML not used.
- HTML sites are slow upon client-side technologies whereas DHTML sites are comparatively faster.
- Web pages created using HTML are rather simple and have no styling as it uses only one language whereas DHTML uses HTML, CSS, and Javascript which results in a much better and way more presentable webpage.
- HTML cannot be used as server side code but DHTML used as server side code.
- DHTML needs database connectivity but not in case of HTML.
- Files in HTML are stored using .htm or .html extension while DHTML uses .dhtm extension.
- HTML requires no processing from the browser but DHTML does.
DHTML Introduction
DHTML, or Dynamic HTML, is a technology that differs from traditional HTML. DHTML combines HTML, CSS, JavaScript, and the Document Object Model (DOM) to create dynamic content. It uses the Dynamic Object Model to modify settings, properties, and methods. Scripting is also an essential component of DHTML, which was part of earlier computing trends. It is supported by some versions of Netscape Navigator and Internet Explorer 4.0 and higher.
HTML: HTML stands for Hypertext Markup Language and it is a client-side markup language. It is used to build the block of web pages.
Javascript: It is a Client-side Scripting language. Javascript is supported by most of browsers, and also has cookie collection to determine the user’s needs.
CSS: The abbreviation of CSS is Cascading Style Sheet. It helps in the styling of the web pages and helps in designing of the pages. The CSS rules for DHTML will be modified at different levels using JS with event handlers which adds a significant amount of dynamism with very little code.
DOM: It is known as a Document Object Model which acts as the weakest link in it. The only defect in it is that most of the browsers does not support DOM. It is a way to manipulate the static content.
DHTML is not a technology; rather, it is the combination of three different technologies, client-side scripting (JavaScript or VBScript), cascading style sheets and document object model.
Note: Many times DHTML is confused with being a language like HTML but it is not. It must be kept in mind that it is an interface or browsers enhancement feature which makes it possible to access the object model through Javascript language and hence make the webpage more interactive.