Writing Good HTML

This final section is concerned with the production of good HTML, as well as with the importance of testing your Web documents before going 'live'.

There are a number of online validation services that check the validity of a Web page. The World Wide Web Consortium's HTML Validator , for example, checks HTML documents for compliance with W3C HTML Recommendations and other HTML standards.

If there are mistakes in the HTML document, the validator will list the problems — but if it is correct, it provides a message similar to:

 Valid HTML 4.0
 No errors found! 
 Congratulations, this document validates as HTML 4.0 Transitional! 
    

Certain HTML editors or authoring tools have built-in HTML checkers or validators; these are sometimes useful, but are not always accurate. Sometimes they notice 'errors' you have intentionally entered, but mostly they can be of great help, particularly when producing complex Web pages.

The more sophisticated tools are able to adjust to the level of the target browser, as well as fine tune options such as listing missing ALT attributes inside IMG tags.

To Do

Read about HTML style in your textbooks. Also check online for further guidelines and hints.

Activity 13: Validating HTML (Optional)

This Activity examines online HTML Validation Services you studied on page 11 of 'Web Design in a Nutshell'.

  1. Look at the at W3C's Validator and submit two or three of your Web pages. What happens?

    Note that you need to give the validators an URL. In other words, your document must exist somewhere on the WWW for it to be validated. You could search for a free hosting service, or place the page on the personal server space most ISPs provide for their clients. Obtaining an URL is not trivial, but it will allow you to validate your code.

  2. Try at least one other online validation service and compare the results. Which is the easiest to use? What features of the services do you like or dislike?

  3. Discuss your results with the other students in the course in the Discussion Forum.