What is Dynamic HTML or DHTML?
DHTML allows scripting languages to change variables in a web page’s definition language, which in turn affects the look and function of otherwise “static” HTML page 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, Perl, JSP or ASP.NET) where the web server generates content before sending it to the client.
(1) Part 1 – start
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns = "http://www.w3.org/1999/xhtml">
(2) Part 3 – the body – includes the web page contents
<body> <p id = "pText">Welcome to our Web page!</p> </body>
(4) Part 4 – the end
Features of DHTML:
1. Simplest feature is making the page dynamic.
2. Can be used to create animations, games, applications, provide new ways of navigating through web sites.
3. DHTML use low-bandwidth effect which enhance web page functionality.
4. Dynamic building of web pages is simple as no plug-in is required.
5. Facilitates the usage of events, methods and properties and code reuse.
Advantages of DHTML
- In comparison to other multimedia software like Flash and shockwave, it took less space. Those resulted in short download time which saved bandwidth as well as made website quick.
- DHTML was fast & zippy depending upon your device and ISP. You didn’t need an extra plugin to make it work efficiently as it used the features present in the browsers. The content loaded on the fly. The whole page didn’t load promptly and saved time for end users by altering just the content part.
- It was supported in some form or shape by major browsers from Microsoft, Netscape. It also worked well with cell phones, PDAs, and PDFs.
- DHTML was considered to design friendly offering web designers different options to give web pages a compact look. It had more advanced functionality than a static HTML & holds more content on the web page at the same time.
- What made DHTML famous at its prime was its outlook. It was popular among clients due to its sleek nature & flexibility to make changes to their data.
- Due to low file maintenance, it saves time for web designers and is more efficient for content management. The use of dynamic XML made the high volume of content look reasonable avoiding any lag.
- DHTML was great with functionality. However, it still required few utilities and tools that used to come at a heavy price. An example of DHTML text editor is Dreamweaver that range from $19.99 per month. Also, the training and improvement cost for transferring from HTML to DHTML makes cost rise much higher.
- The long and complex coding structure can be daunting for few. You need to be well versed with HTML, JS, & CSS to produce a better output.
- DHTML suffers from browser compatibility. What works for Netscape may not work on IE. If you don’t make compatibility check while writing codes, the output may be a mess.
- It was mainly used for animation on web pages. However, due to the problem of web languages, DHTML didn’t perform too well with every platform.
Distinguish between Static vs. Dynamic HTML
1. The easiest difference is static HTML once rendered cannot be changed on the other hand dynamic HTML can be changed.