Difference between HTML and DHTML
Key difference: HTML stands for HyperText Markup Language. It is a well known mark up language used to develop web pages. It has been around for a long time and is commonly used in webpage design. 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.
HTML stands for HyperText Markup Language. It is a well known mark up language used to develop web pages. It has been around for a long time and is commonly used in webpage design. XML or Extensible Markup Language defines a set of rules for encoding documents in a format that can be read by both, human and computer.
HTML is written using HTML elements, which consist of tags, primarily and opening tag and a closing tag. The data between these tags is usually the content. The main objective of HTML is to allow web browsers to interpret and display the content written between the tags. The tags are designed to describe the page content. HTML comes with predefined tags. They allow one to insert images, text, videos, forms and other pieces of content together into a cohesive webpage.
DHTML also allows the pages to change at any time, without returning to the Web server first. It allows scripting languages to change a web page's look and function after the page has been fully loaded and during the viewing process. It also allows the user to add effects to their pages that are otherwise difficult to achieve.
Wikipedia list additional DHTML features, such as DHTML allows the developers to:
- Animate text and images in their document, independently moving each element from any starting point to any ending point, following a predetermined path or one chosen by the user.
- Embed a ticker that automatically refreshes its content with the latest news, stock quotes, or other data.
- Use a form to capture user input, and then process, verify and respond to that data without having to send data back to the server.
- Include rollover buttons or drop-down menus.
Some 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 allows including small animations and dynamic menus in Web pages.
- DHML used events, methods, properties to insulate dynamism in HTML Pages.
- 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.
Image Courtesy: teamtreehouse.com
Image Courtesy: mediaspins.com