DHTML (Dynamic Hyper Text Markup Language)
DHTML provides an easy way for creating dynamic and interactive web pages. It allows you to create web pages that evaluates and responds to user inputs. In addition, you can add animation effects to web pages and generate a link to the database to store and retrieve data.
The HTML elements are automatically reformatted to display the visual affects and other dynamic changes. For every change that is carries out the changes at the user’s computer. Thus, the user does not have to wait to view the modifications. In addition, DHTML does not require any third-party software to carry out the changes.
Need for DHTML
Static pages that are created using HTML and CSS concentrate more on the presentation layout of the web page. These pages are not dynamic by nature. This means that the interaction of user with the web is limited. In addition, these static web pages are not updated. This degrades the web site quality giving an impression that the web page is not updated from a long time. This results in greater cost for updating and maintaining the web site. To overcome these problems, dynamic web pages were created.
Dynamic web pages are more interactive and sophisticated web pages. They provide the user with the updated content. In addition you can create a use interface that allows you to display new content without downloading additional document from web server. This can be achieved using Dynamic Hypertext Markup Language (DHTML).
DHTML allows you to create interactive web pages without having to compromise on its presentation. DHTML provides various features for effective development of dynamic web pages. Some of the features of DHTML are:
- Dynamic Styles: DHTML allows you to apply different styles to your content. You can format the appearance of the content without having to alter the existing elements. This can be done by using CSS.
- Dynamic Content: DHTML allows you to dynamically change the content of the web page. It allows you to generate values based on mathematical calculations and add and retrieve data from the database on the occurrence of certain events.
- Real-time positioning: DHTML allows you place the elements on specific locations on the web page. This can be done by using the different positioning techniques defined by CSS. The three different positioning techniques are absolute, relative, and fixed positioning.
DHTML allows you to modify the desired content at the user’s computer with results in very few requests made to the server. This means that it improves the performance of the server by reducing the number of requests.
Apart from this, there are some more features of DHTML, which are:
- Font Download: DTHML supports different types of fonts that can be downloaded. These fonts can be used in your web page.
- Dynamic Binding: DHTML allows you to dynamically access data from the database. You can display this data in HTML controls such as text boxes, labels, and so on.
- Scripting: DHTML allows you to embed scripts within an HTML document to develop user interactive and innovative web pages.
DHTML provides an object model that represents a collection of elements that are used by the scripts to programmatically access and manipulate the web page. This object model is referred as Document Object Model (DOM). DHTML DOM refers the different elements contained within the web page as objects. It is a platform independent object model that allows the scripts to access the HTML and CSS elements.
DHTML DOM provides full support to events triggered by the user. This allows responding to user’s input and to generate better interactivity with much ease.
Every element contained within a web page is referred as an object. The DHTML objects allow you to access and manipulate the element by using the different properties and methods. The table lists some of the DHTML objects.
Specifies the beginning and end of a hypertext link.
Specifies the start and end of the body of the document.
Divides a web page into multiple sections, where each section can render other HTML elements.
Represents the entire HTML document.
Specifies a container for other controls, which accepts input from user.
Specifies a frame with a frameset.
Specifies a frameset that can hold multiple frames.
|html||Specifies that the elements within the document are HTML elements.|
Other DHTML objects
There are other DHTML objects that refer to the other HTML elements contained within the web page. The table lists some of the other DHTML objects.
Specifies an image or video clip to be embedded within the document.
Creates different from input controls.
Specifies a list item.
Specifies a link between the existing document and external documents.
Specifies an inline element to apply styles to a part of the text.
Specifies that the content should be displayed in a table.
Specifies the data to be displayed in a table cell.