W3 Standards
You open a web page. But you can’t see all of its contents. However, the same page is fully visible on the some other web browser. This happens because of certain elements the designer has chosen to apply on his web page.
While designing a web site, you have to follow certain standards laid down by W3C. Doing this means your code is validated. A web validator is a software program that checks the code of a web page vis-à-vis the W3C web standards. It tells you whether the code is correct or not. At times it also gives you the line number where the error occurs.
Each HTML document requires a document type declaration. In the beginning of an HTML document, "DOCTYPE." must be declared. It tells the validator about the version of HTML against which all the documents are checked.
There are three types of versions. These are explained below:
Strict
In this version, least number of elements are allowed. It is the trimmed version of HTML 4.01, which does not include deprecated elements, attributes and documents containing frames. If these elements are added, the code will not get validated. In other words, elements which are supported by all the browsers come under this category.
Transitional
This version includes all the elements and attributes of HTML 4.01. It includes strict elements, deprecated elements and link targets.
Frameset
This version includes the support for documents with frames, deprecated elements as well as link targets. Html frames are used to break up the browser window into two or more frames. If " DOCTYPE = frameset " is used, then most of the current browsers will support all the features in a web page.
Validation of style
There are various websites available which will permit you to freely validate your HTML document and CSS codes against W3C standards. If you want to validate your website, enter your website address and click on "Validate URI". After a few seconds you will receive a message indicating whether your code has been validated or not.
| Summary |
| |
In this chapter you have learnt:
- The importance of W3 standards
- Why W3 standards are followed, while designing a website
- The purpose of a web validator
- Various types of validator
- Validating a website code
|
|