Definition of XHTML and DHTML
Miscellanea / / July 04, 2021
By Guillem Alsina González, in Jan. 2019
The markup language HTML is used for the building of web pages since the beginning of this online service of Internet, but with time and evolution of the environment in which he works, the same language has undergone extensions and changes, as well as variants have been born.
This is the case of the two most used, XHTML and DHTML, which we will explain in this article.
XHTML is a variant of HTML in which the markup language is expressed as a correct variant of XML.
HTML was born from XML, but allowing itself some freedom. Thus, they can exist tags not closed, as in the case of
or the
.
XHTML does not allow these errors, making it a language that becomes stricter but, at the same time, easier to debug for errors in the code.
Other rules that affect it -which are no more than those expressed in XML- are the obligation to enclose all numerical values in double quotes (in HTML we can be more lax in this regard in certain circumstances), and the requirement that the elements and attributes be written in lowercase, something that makes it difficult to read the simple code sight.
For its part, DHTML is called dynamic HTML, and it is used to create dynamic websites that change on the client side. You need the competition of other resources that can work together with conventional HTML.
And sayings resources are usually summed up in the language of programming JavaScript, which provides control of execution flows, and CSS style sheets, which allow you to provide a coherence visual to the generated pages.
These pages are composed at the moment (dynamically, and hence the name of the language) since they depend on what is found at each moment in the database, and its content may vary, either with the single interaction from the side of the client, whether from that side it interacts with another element of the server, such as a database.
An example would be a site that allows us to follow the results of the different national competitions soccer while matches are in progress, and changes as goals and other events.
The results change as the matches evolve, so the queries must be made dynamically on the database (which is where the results are entered) and presented at the moment to the user without having to reload the entire page.
Photos: Fotolia - Dervish15 / 4Max
Themes in XHTML and DHTML