HTML and CSS Reference
In-Depth Information
Documents served with an XML MIME type, such as application/xhtml+xml , are treated as XML documents
by browsers; in other words, they are parsed by an XML processor. Consequently, XML and HTML are processed
differently. In fact, even minor syntactic errors will prevent an XML document from being rendered correctly. In
contrast, the errors of such documents would be ignored in the HTML syntax. A parsing error of XML documents can
easily result in the “Yellow Screen of Death.”
Version Overview
Understanding the major differences and capabilities of the different markup language versions and variants and
analyzing sample documents with minimum content known as skeleton documents is very useful. These documents
can serve as the basis for hand coding from scratch. While indentation is used to provide clear, easy-to-understand
code, tabulators can be omitted to obtain optimal code length. Since all provided documents are valid character by
character on an as-is basis, they can be used to create standards-compliant documents from scratch, and should be
extended with valid markup only to maintain validity. All these documents can be downloaded from the topic's web
page at , as well as from the companion web site of the topic at .
HTML Versions and Variants
This section will highlight the milestones of HTML history. The described HTML versions have made a significant
impact on the evolution of the Web, and were used to form newer standards. Some of these old HTML versions were
used for more than 10 years.
The formal specification of HTML was created in 1992, and this specification has evolved constantly, introducing
new SGML Document Type Definitions. HTML soon became the lingua franca of web publishing. HTML documents
can be created manually in plain-text editors as well as in WYSIWYG environments. 3 HTML is not case-sensitive.
HTML 2.0 was created by the HTML Working Group of the Internet Engineering Task Force in 1995 as the RFC
1866 specification [10]. HTML 2.0 was the first standardized form of the core HTML elements. HTML 2.0 was used for
platform-independent hypertext documents [11]. The HTML 2.0 document type is obsolete and considered as historic.
HTML 3.2 is the first HTML Recommendation from W3C. HTML 3.2 introduced new elements for tables, applets,
superscripts, subscripts, and text flows around images [12]. HTML 3.2 was backward-compatible with version 2.0.
The code in Listing 3-1 is a fragment of an HTML 3.2 document which demonstrates bad practices.
Listing 3-1. Bad Practices in an Old HTML Document (Just Demonstration, Should Not Be Used)
<title>An HTML 3.2 example</title>
<body bgcolor="#FFF6F0"
text="#000000" link="#C00000" >
<h1 align=center >Example header</h1>
<p>< A HREF =><img align=left border=0 alt="Example:"
width=102 height=52
src=></A> <i>The Author</i>
This is very poor quality code, because some of the attributes are not quoted (for example, width=102 instead of
width="102" ), strictly presentational attributes ( bgcolor , align ) are used that should be written in CSS instead, the
paragraph is not closed (the </p> tag is missing), and so forth.
3 Web Quality Assurance relies on hand coding.
Search WWH ::

Custom Search