UNIT 5 > MODULE 4

Lesson 1: Validating Your XHTML

Overview

In this lesson, you will have an opportunity to use the W3C HTML Validator, and to correct invalid code based on validation tool feedback. An invalid web page might look fine in your browser, but someone accessing the page in another browser might have an entirely different experience with the same content. Valid HTML or XHTML assures that all standards-compliant browsers will display the page reliably.

Learner Outcomes

At the completion of this exercise:

Activities

Validate a Sample Page

  1. Open the sample invalid web page . Does this page display ok in your browser?
  2. View the web page's source code. Can you find the HTML errors?
  3. Save the sample invalid web page on to your local drive.
  4. Now try testing this using the W3C HTML Validator. What HTML errors does the validator find? Did it find any errors that you overlooked? Use the second option to "Validate by File Upload" and browse to locate the sample invalid web page on your local drive.
  5. Correct any problems found by the Validator, then save the web page, and retest until the document passes the validity test.

Validate Your Own Pages

  1. Validate all web pages you have created in this course using the W3C HTML Validator.
  2. Correct any problems found by the Validator, then retest until the document passes the validity test.
  3. After the page passes the validity test, the W3C validator will provide you with some source code for adding a W3C icon at the bottom of your page. Paste this into the body of the document wherever you think it looks best. This is your trophey for creating a valid web page!

Resources/Online Documents

All done?

Turn your website in to your instructor, so they can confirm that your website has valid HTML.