Relation between HTML and DHTML
These days, web pages are rarely designed using only HTML. Thus allowing the programmer to embed scripts written in languages such as JavaScript, which many often do. This changes the look and behavior of the HTML web pages.
DHTML is essentially Dynamic HTML. It is a new way of looking at and controlling the standard HTML codes and commands. DHTML is a collection of technologies that are used to create interactive and animated web sites. DHTML gives more control over the HTML elements. It allows one to incorporate a client-side scripting language, such as JavaScript, a presentation definition language, such as CSS, and the Document Object Model in HTML web page.
Differences between HTML and DHTML:
- HTML is a mark-up language, while DHTML is a collection of technology.
- DHTML creates dynamic web pages, whereas HTML creates static web pages.
- DHTML uses events, methods, properties to insulate dynamism in HTML Pages.
- DHTML is basically using JavaScript and style sheets in an HTML page.
- HTML sites will be slow upon client-side technologies, while DHTML sites will be fast enough upon client-side technologies.
- HTML creates a plain page without any styles and Scripts called as HTML. Whereas, DHTML creates a page with HTML, CSS, DOM and Scripts called as DHTML.
- HTML cannot have any server side code but DHTML may contain server side code.
- In HTML, there is no need for database connectivity, but DHTML may require connecting to a database as it interacts with user.
- HTML files are stored with .htm or .html extension, while DHTML files are stored with .dhtm extension.
- HTML does not require any processing from browser, while DHTML requires processing from browser which changes its look and feel.