Saturday 18th of November 2017 04:52:31 PM

CSS Style Guide

XHTML: Benefits

Converting from HTML to XHTML is easy, and provides the library with several immediate and long–term benefits:

A painless transition to more advanced technology
The web is moving to XML, a powerfully enabling technology. Writing well–formed, valid XHTML pages is the easiest way to begin this transition. All it takes is learning a few simple rules of XHTML markup.
Cleaner, more logical markup
XHTML brings uniformity to document structure. The rules of XHTML help restore the structural integrity of documents that was lost during the web’s rapid commercial expansion between 1994 and 2001. This is critical for large organizations such as ours, whose web pages must interface with logically–marked–up documents in legacy systems and databases.
Increased interoperability
Unlike old–style HTML pages, valid, well–formed XHTML documents can easily be “transported” to wireless devices, Braille readers and other specialized web environments. Moreover, XHTML’s insistence on clean, rule–based markup helps us avoid the kind of errors that can make web pages fail even in traditional browsers like Microsoft Internet Explorer, Netscape Navigator, and Opera Software’s Opera browser.
Greater accessibility
Because they follow strict rules and avoid non–standard markup, well–authored XHTML pages are more accessible than old–school HTML pages, helping the library comply with U.S. laws and accessibility guidelines.
« XHTML Section Index | XHTML Authoring Tips 'n Tools »

If you wish to place comments on the same line as markup, then youneed to be careful about how you place them. For example, this is thecorrect way to do it:

H1 {color: gray;}   /* This CSS comment is several lines */H2 {color: silver;} /* long, but since it is alongside */P {color: white;}   /* actual styles, each line needs to */PRE {color: gray;} /* be wrapped in comment markers. */

Given this example, if each line isn't marked off, then most ofthe style sheet will become part of the comment, and so will not