HTML and CSS Reference
Listing 1-2. High-Traffic Web Sites Do Not Necessarily Apply Standard Code
<body class="ego_page home hasLeftCol fbx ie8 win Locale_en_US">
<input type="hidden" id="post_form_id" name="post_form_id"
value="b053066a05f482d5739d31c033b5fd90" autocomplete="off" /><div
id="pagelet_presence"></div><div id=" HiddenContainer" style="position:absolute; top:-10000px;
width:0px; height:0px;" ></div><div id="blueBar" class=""></div><div id="globalContainer"><div
id="dialogContainer"></div><div id="c4d06220d5f2c97d20912236"><div class="ptm clearfix"
Such software-generated markup codes are almost impossible to understand even if you are an experienced
hand-coder. There are problems with virtually every element and attribute. The class attribute has an empty value.
Identifiers are unreasonably long and not descriptive at all, such as c4d06220d5f2c97d20912236 . There is inline style
in the source, which should be in an external style sheet.The layer positioning with -10,000 pixels is obviously a trick
that could be eliminated by proper implementation of standards. Attributes should not be empty, especially if they are
intended to be used for identification (a class without a name cannot be used to identify an element class). Even for
these few lines, the error list is long.
Visual Appeal Over Functionality
Design is one of the major concerns in web site development. Adobe Flash is an ideal technology to provide a
stunning appearance, catch attention, and stream videos. Full Flash sites, however, have several disadvantages. Unless
the web document is a single-page, brochure-style home page that provides contact data, it is far better to develop
(X)HTML content, because textual markup has several benefits over binary files. It is especially true with the
exploitation of the new, interactive HTML5 elements and CSS3 properties, which are good alternatives to Flash content.
Graphic designers are not necessarily web developers. As a consequence, Flash movies are often embedded
incorrectly. Although Flash files can theoretically work in any browser with an appropriate plug-in, markup codes
controlling them can be browser-dependent, which should be eliminated.
There is nothing wrong with Flash, but it is better used for headers and inline animations only. The combination
of XHTML and CSS can provide a similar, even more advanced, user experience, but without the need to download
large files in full before showing the content of the index page. While it is not a problem for fast connections, there are
millions of users around the world who have to wait for half a minute to download such contents. Even if the Flash
files are streamed in certain browsers, the menus and content are unusable until downloading is completed. Web
sites based on markup can be indexed and searched more effectively, are smaller in size, and have full control over the
browser window by default. Text content is much more robust to render than any other format. Even if some images
fail to download or there are some styling problems, the content is still there (if not absolutely positioned outside the
window or written in the color identical to the background). Unlike that of Flash contents, (X)HTML text sharpness,
font size, and other features can be changed upon user request directly from the browser. 11
Some software companies recognized the advantages of markup languages over Flash and released tools to
convert Flash files to HTML (for example, FlashKeeper ). Even Adobe has an FLA-HTML converter called
Wallaby . However, similar to other automated markup generators, extended care must be taken with them
because the result is often invalid and, therefore, not optimal.
A basic requirement for XML documents and a desired one for all web documents is well-formedness , which is vital
in standardization, because it guarantees that the list of syntax rules defined in the corresponding specifications are
11 Although there are advanced font manipulation possibilities in Flash Player from version 10, too.