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:
- you will be able to test a web page using the W3C HTML Validator.
- you will have gained practice interpreting the Validator results and applying them toward correcting invalid XHTML code.
Activities
Validate a Sample Page
- Open the sample invalid web page . Does
this page display ok in your browser?
- View the web page's source code. Can
you find the HTML errors?
- Save the sample invalid web page on to your local drive.
- 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.
- 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
- Validate all web pages you have created in this course using the W3C HTML
Validator.
- Correct any problems found by the Validator, then retest until the document
passes the validity test.
- 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.
Copyright © 2005-2008 by University of Washington.
Permission is granted to use these materials in whole or in part for
educational, noncommercial purposes provided the source is acknowledged.
This product was created with support from the National
Institute on Disability and
Rehabilitation Research of the U.S. Department of Education (grant
#H133D010306), and is maintained with support from
the National Science Foundation (grant #CNS-054061S). The contents do not
necessarily represent the policies of the U.S. federal government, and you
should not assume their endorsement.