Pages

SPONSORED

Dynamic HTML (DHTML)

DHTML, Dynamic HTML sounds like extension to HTML. It isn’t just DHTML; DHTML is not a language, it is a technology. It is collection of JavaScript, CSS and DOM technologies. HTML creates static web pages. Static means the pages remain constant throughout. HTML pages can still be made dynamic with the help of server side scripts or AJAX. However this is on request response basis.

Does this mean that it is possible to create dynamic pages without using request response technique? Yes, using DHML. DHTML helps in creating dynamic pages after that page is fully loaded. It can alter the page when the user is viewing the page. The scripting language associated with it (JavaScript) alters the variables and changes the content on the page and makes it dynamic. DHTML controls HTML codes and commands. This feature of DHML has made it helpful in creating interactive and animated web pages.

Example:
<html>
<head>
<script language="javascript">
function changeText(){
document.getElementById("test").value ="DHTML example..."
}
</script>
</head>
<body>
<input type="button" id="test" value="   Click Here  " onClick="changeText()" />
</body>
</html>


By now you would have realised that this not something new! You have been using it in your day-to-day coding. We generally call it client side coding, it collectively referred as DTHML in technical language.

Ajax is one step ahead of this. It is DHTML plus server side call. Concept still remains the same, we dynamically create pages but with a call to server. I will not get into details of Ajax as it not in scope of this post.