HTML and CSS Reference
In-Depth Information
HTML or XHTML Version
A new implementation of XHTML that will not provide backward
compatibility with XHTML 1.0 and traditional HTML. XHTML 2 will
remove all presentational tags and will introduce a variety of new
tags and ideas to the language.
XHTML Basic 1.0
A variation of XHTML based upon the modularization of XHTML (1.1)
designed to work with less-powerful Web clients such as mobile
XHTML Basic 1.1
An improvement to the XHTML Basic specification that adds more
features, some fairly specific to the constrained interfaces found in
mobile devices.
T ABLE 1-1 Description of Common HTML Versions (continued)
Beyond the standard forms of markup described in Table 1-1, there are of course various
nonstandard forms in play. For example, the browser vendors introduced various extensions
to HTML and, interestingly, continue to do so. We also have to contend with the ad hoc use
of markup that doesn't really conform fully to any particular standard other than to what
usually renders in common Web browsers. Such a “tag soup” is certainly not the best way
to approach building Web pages, regardless of whether browsers accept it. Standards for all
forms of markup exist and should be adhered to whenever possible.
HTML and XHTML DTDs: The Specifications Up Close
Contrary to the markup some Web developers seem to produce, both HTML and XHTML
have very well-defined syntax. All (X)HTML documents should follow a formal structure
defined by the World Wide Web Consortium (W3C;, which is the primary
organization that defines Web standards. Traditionally, the W3C defined HTML as an
application of the Standard Generalized Markup Language (SGML). SGML is a technology
used to define markup languages by specifying the allowed document structure in the form
of a document type definition (DTD). A DTD indicates the syntax that can be used for the
various elements of a language such as HTML.
A snippet of the HTML 4.01 DTD defining the P element, which indicates a paragraph,
is shown here:
<!--=================== Paragraphs =====================================-->
<!ELEMENT P - O (%inline;)* -- paragraph -->
%attrs; -- %coreattrs, %i18n, %events --
The first line is a comment indicating what is below it. The second line defines the P
element, indicating that it has a start tag ( <P> ), as shown by the dash, and an optional close
tag ( </P> ), as indicated by the O . The type of content that is allowed to be placed within a
P element is defined by the entity %inline , which acts here as a shorthand for various other
elements and content. This idea of only allowing some types of elements within other
Search WWH ::

Custom Search