HTML and CSS Reference
In-Depth Information
One of the most famous browser bugs was the Internet Explorer box model bug that made identical pixel-by-pixel
rendering in various browsers impossible. It occurred as Microsoft's own box model implementation instead of the
W3C CSS box model [96] in earlier versions of Microsoft Internet Explorer. (Some web developers, however, argue
that the box model implemented in IE5 was more logical than that of W3C's [97]; still, it was not standard.) IE6 and
newer versions eliminate the problem in Standards Mode. For the sake of compatibility, however, the bug is still
present in Quirks Mode. (Internet Explorer for Mac, which was discontinued in 2006, was not affected.) According
to the W3C CSS1 specification, released in 1996 (revised later several times), determining the width and height
attributes of all block-level elements should affect the width and height of visible elements only while the padding,
borders, and margins should be applied later. Internet Explorer 5 wrapped the content, padding, and borders within
a predetermined width/height. As a result, the rendering box was different from what was expected. The box model is
present in newer versions of the Cascading Style Sheets specification too, including CSS 2.1 [98] and CSS3 [99].
Standard-compliant web pages can be opened faster since browsers can use Standards Mode instead of figuring
out nonstandard markup in Quirks Mode.
Internet Explorer 6 rendered all pages in Quirks Mode if anything other than a byte-order mark appeared before
the DOCTYPE declaration.Modern browsers render all pages providing a DOCTYPE in Standards Mode, whether they are
served with or without an XML declaration.
Problem Statement
It is a common misconception that web standardization is a well-regulated process. In reality, there is no clear set of
rules to follow. Although W3C develops web technologies for markup, annotation, styles, and so on, that will sooner
or later obtain an official mandate, the implementation of their “standards” (recommendations) is an expectation
only. Unlike the standards announced by standardization organizations, for example, the ISO, web recommendations
are adopted globally because of the lack of an official status [100]. Individual vendors and web site developers
might follow some of the recommendations, might not. This approach proved to be insuffiecient in the widespread
implementation of web standards. In fact, 99.9 percent of web sites are obsolete in terms of standards compliance
[101], since a large share of web sites are based on invalid code.
A comprehensive validation test series was conducted in 2011 on the 350 most popular web sites in the world
(selected by Alexa index 9 [102]). The test found 94 percent of those web sites failed the web standards validation tests
that covered character encoding, markup, and style sheets.
While UTF-8 should be used everywhere, 12 other character encodings were also used, namely, ISO-8859-1,
GB2312, Shift_JIS, GBK, Windows 1251, EUC-JP, Windows 1256, ISO-8859-15, ISO-8859-2, ISO-8859-7, ISO-8859-9,
and Windows 874. As for the markup languages, nine (X)HTML versions and variants were identified which confirms
web designer unawareness and lack of skills or experience. At the time of the test, 14 percent of web sites had applied
HTML5 before the specification had been finalized, 23 percent used the obsolete HTML 4.01 Transitional, 45 percent
the XHTML 1.0 Transitional, 8 percent the XHTML 1.0 Strict, 5 percent the HTML 4.01 Strict, and 5 percent other
languages such as HTML 4.0 Transitional, HTML 4.0 Strict, and XHTML 1.1 (Figure 1-4 ). Although two versions,
XHTML 1.0 Strict and HTML5, can be considered modern markup languages, they were applied incorrectly: the
markup was full of errors on many sites. This situation was clearly indicated by the average number of markup errors,
which was 6. The number of style sheet errors was even higher, with an incredible high maximum of 738 errors (!) in a
single CSS file. The average number of CSS errors was 45. And these numbers represented the index files only.
9 Naturally, the list of web sites changes constantly, but it does not change the conclusion.
 
Search WWH ::




Custom Search