Tuesday, March 9, 2010

Web standards and why should we use them?

>> What is the W3C?

The World Wide Web Consortium (W3C) is an international industry consortium dedicated to "leading the Web to its full potential". It's led by Tim Berners-Lee, the inventor of the Web. Founded in 1994, the W3C has more than 330 member organizations - including Microsoft, America Online (parent company of Netscape Communications), Apple Computer, Adobe, Macromedia, Sun Microsystems, and a variety of other hardware and software manufacturers, content providers, academic institutions, and telecommunications companies. The Consortium is hosted by three universities - MIT in the US, INRIA in Europe, and Keio University in Japan. 

>> What does it do?

The W3C develops open specifications (de facto standards) to enhance the interoperability of Web-related products. W3C Recommendations are developed by working groups consisting of Consortium members and invited experts. Working groups obtain general consensus from companies and other organizations involved in creating applications for the Web, and create Working Drafts and Proposed Recommendations. These are then submitted to the W3C membership and director, for formal approval as W3C Recommendations. More information regarding this process and the review stages can be obtained from the W3C Web site.

>> What are the W3C standards?

1. HTML 4.0 - HyperText Markup Language
HyperText Markup Language (HTML) is widely used on the Web for adding structure to text documents. Browsers interpret these documents, representing the structure in media-specific ways to the user. For example, visual browsers typically display the strong element ( ... ) as bold text, while text-to-speech readers might emphasize that text when pronouncing it.
With the help of Cascading Style Sheets (CSS) the author may define how structural elements are to be represented, overriding the browser defaults.

2. XML 1.0 - Extensible Markup Language
Extensible Markup Language (XML) is a markup language like HTML, but instead of having a single, fixed set of elements, it allows you to define your own - or use a set made by someone else. It even allows using multiple sets within a single document - by using XML namespaces.
Some applications of XML, such as XHTML and MathML, have already become W3C Recommendations. Others are currently W3C Working Drafts.
Style sheet standards, such as CSS and (in the future) XSL, can be used to specify how XML elements are to be rendered. CSS and XSL both allow you to specify different styles for different media, so that you can have separate sets of styles for visual, voice, braille and other media.
XML is more flexible than HTML, primarily because of the ability to add your own elements and make your own structural systems. This makes it an ideal format for the organization of large quantities of data - it is already in use in many databases and search engines.

3. CSS - Cascading Style Sheets
Cascading Style Sheets (CSS) is a mechanism for changing the appearance of HTML or XML elements, by assigning styles to element types, self-defined classes of elements or individual instances.
Stylesheets can be used to consistently define the appearance of an entire site. Following the introduction of CSS, the W3C recommended that layout-specific features in HTML be phased out and replaced by stylesheets, creating a simpler and more structural World Wide Web.

4. DOM 1 - Document Object Model Level 1
The DOM allows the full power and interactivity of a scripting language (such as ECMAScript, the standardized version of JavaScript) to be exerted on a Web page. (In programming terms, the Document Object Model (DOM) Level 1 is an Application Programming Interface (API) for interacting with Web pages.) It gives the scripting language easy access to the structure, content, and presentation of a document which is written in such languages as HTML and CSS.
The DOM is compatible with future improvements in technology; it will allow any scripting language to interact with whatever languages are being used in the document. This standard will not only make it easier to program dynamic HTML, but will also make adapting to future Internet technology much less painful.

5. Emerging Standards
The W3C is constantly at work on creating new standards; the most important of these right now are are XHTML and XSL. XHTML, Extensible Hypertext Markup Language, is a reformulation of HTML 4.0 in XML; XSL, the Extensible Stylesheet Language, is a language for transforming and displaying XML documents, using an XML vocabulary.

>> Advantages of W3C standards?

1. For software/machines
Complying with Web standards can give your Web pages greater visibility in Web searches. The structural information present in compliant documents makes it easy for search engines to access and evaluate the information in those documents, and they get indexed more accurately.
Because use of Web standards makes it easier for server-side as well as client-side software to understand the structure of your document, adding a search engine to your own site becomes easier and gives better results.
Standards are written so that old browsers will still understand the basic structure of your documents. Even if they can't understand the newest and coolest additions to the standards, they'll be able to display the content of your site. The same, of course, applies to robots - systems that collect information from your site on behalf of search engines and other indexers.
Compliant code gives you the opportunity of validating your page with a validation service.Validation process your documents and present you with a list of errors. This makes finding and correcting errors a lot easier, and can save you a lot of time.
Compliant documents can easily be converted to other formats, such as databases or Word documents. This allows for more versatile use of the information within documents on the World Wide Web, and simplified migration to new systems - hardware as well as software - including devices such as TVs and PD-As.
2. For Users
Accessibility is an important idea behind many Web standards, especially HTML.Not only does this mean allowing the Web to be used by people with disabilities, but also allowing Web pages to be understood by people using browsers other than the usual ones - including voice browsers that read Web pages aloud to people with sight impairments, Braille browsers that translate text into Braille, hand-held browsers with very little monitor space, teletext displays, and other unusual output devices.
As the variety of Web access methods increases, adjusting or duplicating Web sites to satisfy all needs will become increasingly difficult (indeed, some say it's impossible even today). Following standards is a major step towards solving this problem. Making your sites standards-compliant will help ensure not only that traditional browsers, old and new, will all be able to present sites properly, but also that they will work with unusual browsers and media.
Some consequences of ignoring standards are obvious: the most basic consequence is that you will restrict access to your site. How much business sense does it make to limit your audience to only a fraction of those who wish be a part of it? For a business site, denying access to even small portions of a target audience can make a big difference to your profit margin. For an educational site, it makes sense to allow access not only to affluent, able-bodied school-children with graphical browsers, but also to children in Third-World countries who only have text-based browsers access, or disabled students using specialized browsers.
The same principle applies to all types of Web site - while straying from the standards and taking advantage of browser-specific features may be tempting, the increased accessibility which comes from standards-compliance will lead to far greater rewards in the long run.