HTML and CSS Reference
In-Depth Information
although HTML allows both capitalized and lowercase letters in element and attribute names, it is better to use
lowercase letters, which are allowed in every markup (including XHTML, which is case-sensitive).
Tip
HTML 4 was an ISO-conforming version (ISO 8879) and the de facto standard, the “publishing language of
the World Wide Web,” for years [13]. The specification was released in 1997 and revised in 1998. Listing 3-2 shows a
fragment of a typical HTML 4.0 document.
Listing 3-2. A Typical HTML 4 Document (Obsolete)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>An HTML 4.0 example</title>
</head>
<body>
...
</body>
</html>
Note the similarity between the structure of this document and the previous one. The core HTML structure is still
the same.
HTML 4 was superseded by HTML 4.01 , the most well-known HTML version before HTML5, and the primary
markup language of the Web for more than a decade. The HTML 4.01 W3C Recommendation was released in late
1999. The language had three variants: the Strict, the Transitional, and the Frameset [14]. At that time, the best choice
was the Strict flavor, which contained those elements only that had been selected for inclusion in future versions.
The Transitional variant was created to make it easier for web designers to stop using deprecated tags and gave time
to learn writing strict markup without these obsolete tags (hence the name). In the late 1990s, web sites often had a
layout where the menu on the top or left was written in one file and the main content in another (frames), while the
index file was used to control and open these files simultaneously. Such frameset documents are obsolete and should
not be used anymore due to the associated issues. If you accessed a web site with a broken frameset, for example,
missing contents took up the whole window. If a visitor arrived through a direct link to a framed page, the text was
out of context. Search engines could not index frameset documents effectively. There were linking and bookmarking
issues, and further problems such as the Back button did not work in browsers. Frames also reduced the amount of
usable space on a web page and caused problems with printing.
XHTML Versions and Variants
XHTML is a document type family that is the reformulation of HTML in XML rather than SGML. Typical XHTML
file extensions are .html , .htm , .xhtml , .xht , and .xml . XHTML documents usually apply the application/xhtml+xml
Internet media type ; however, there are occasional exceptions (see next chapter).
Beyond the core versions of XHTML (Table 3-1 ), several compounds, extensions, and special profiles are known
(Table 3-2 ), and further ones can also be defined. The additional mechanisms allow XHTML subsets or supersets.
XHTML 1.1 + MathML 2.0 + SVG 1.1 and XHTML+RDFa documents are typical examples for supersets of XHTML.
Because of the additional (external) element sets, these mixed-namespace documents have a wider variety of markup
elements than plain XHTML documents.
 
 
Search WWH ::




Custom Search