Lab Assignment 3: Find the Error

This is a short exercise to help you become comfortable with understanding and fixing validation errors generated by the W3C HTML & CSS validators. In each example, we have altered our home page so that it will no longer validate. Your job is to find those problems by checking the document with the appropriate W3C validator, fixing the error, and ensuring that the document validates.

For each example follow these steps:

  • Download the document (try to keep all of the pages in the same folder/directory)
  • Copy (Use Ctrl+A) and paste the entire source into the relevant validator (choose the “Validate by Input”) and validate the document
  • Read the validation errors
  • Fix the problem(s) in your text editor
  • Copy and paste the new code from your text editor into the validator
  • Repeat until the document passes validation

W3C Document Validation (HTML)

The errors in this section have to do with the markup, the HTML of the document.

  • Document 1
    • Hint investigate the element (alt attribute)
  • Document 2
    • Hint: look for un-closed tags (three in all)
  • Document 3
    • Hint: There are four errors in total: make sure that the page has a title
    • Hint: & cannot exist by itself in a document, you must use & instead