HTML and CSS Reference
Choosing a Markup Language
Since web designers tend to implement the latest markup language even when it is not standardized, rendering web
pages written in the most up-to-date markup always involves some risks.
The Transitional variants of HTML 4.01 and XHTML 1.0 have been developed to ease the work of web developers
by providing features whose replacements have already been planned (tagged as deprecated elements). Their
purpose was to give developers time to change obsolete markup, not to maintain them. The Traditional variants
intended to provide a way to make the transition to modern web standards. Frameset documents are contradictory
with the philosophy of XHTML. Consequently, the Frameset variant of XHTML 1.0 had a purpose similar to that of the
Transitional variant. Both variants have been designed with backward compatibility in mind. In other words, XHTML
1.0 Strict should have been used exclusively after its introduction wherever possible. Although many content authors
have done so, error-free markup has always been very rare. But what is the point of applying a strictly regulated
markup in implementations full of errors? To be fair, web designers are not the only ones to blame because they
often have to deal with incorrect markup in the form of third-party and CMS-generated dynamic content based on
templates that are not standard-compliant.
The potential for modularization in XHTML 1.1 has not been exploited either. XHTML 2.0 has been criticized by
web developers, and the W3C was pushed to suspend the development of the specification.
Because of the new, advanced features introduced in (X)HTML5, it became the recommended markup language.
However, there is no reason to change a valid XHTML 1.0 Strict markup of conventional web documents to HTML5
unless some new features introduced in HTML5 would be really beneficial for the content.
The Benefits of XHTML 1. x over HTML 4. x
In spite of the advantages of strict XML codes, it took several years for developers to realize the power of XHTML and
to implement XHTML instead of HTML. Both HTML and XHTML have their advantages and disadvantages
(see Table 3-18 ).
Table 3-18. HTML vs. XHTML
Benefits of HTML
Benefits of XHTML
Strict XML syntax, well-formed markup
Direct integration with other XML vocabularies, e.g., SVG,
“Loose” syntax that might be convenient for
some developers (permissive nesting,
omission of certain tags and attributes)
Forced elimination of presentational markup
It is easy to see that some HTML features that claimed to be advantageous are not necessarily real benefits
because precise, strict markup should always be considered better than loose markup.
The Benefits of HTML5 over HTML 4. x and XHTML
The latest version of HTML overcame several limitations and inconsistencies of earlier HTML versions and XHTML.
The new parsing rules of HTML5 are not based on SGML, which makes parsing more flexible and improves
compatibility. The new elements provide more sophisticated document structuring ( article , aside , figure , footer ,
section , etc.), new types of form controls, and advanced multimedia embedding ( audio , video ). The obsolete
markup elements were dropped, including acronym , applet , basefont , big , center , dir , font , frame , frameset ,
isindex , noframes , strike , and tt . New attributes have been introduced, such as the id , tabindex , and hidden global