A+ Work





Instructions While it may sound simple to validate your HTML code, it is often times difficult to understand the error messages validation services return. Using the W3C Markup Validation Service, validate and correct the errors in the web page file. After saving the file to your computer, review it and correct as many errors as you can BEFORE validating. Then, upload the file to the validation service. You will need to locate and correct all errors in the file. Once you have finished:upload the corrected file to Canvas via the Upload File tab.NOTE: Just because the page may display correctly, does not mean that it is coded correctly. About Validation The validator is similar to a spell-checker - it will find coding syntax errors but NOT all of your errors. For example, the validator does not check for browser combatibility (more on this later in the quarter), nor does it spell-check your text. It also will not check if your work follows the instructions for the assignment!

For future assignments, you will be REQUIRED to validate your code, and the files must pass validation in order to receive credit and feedback. It will also be important for you to become very familiar with the validation process and deciphering error messages before you get into more complex code.

Pre-Validation Tips

Every document sent to the validator should have: doctype statement meta tag with character encoding title tag other elements necessary in the head section Additionally, make sure that:all CODE is lowercase (excludes the text that will be displayed) all attributes have a value, coded in quotation marks elements include closing tags (except void elements)When you send your code to the validator, begin by following these steps:look at the FIRST error that it lists and try to fix it - you may have only one true error, but elements following that error will be considered incorrect until you fix the previous error if the validator reports an area of code that appears to be correct, look at the code ABOVE the one with the supposed error - many times, an invalid code will make every code AFTER it seem invalid to the validator fix one error at a timeValidation in FirefoxIf you download the Web Developer Add-on for Mozilla Firefox, you can choose to validate your code without going directly to W3C Validator.

To Validate a Published Web Page:Open your web page in Firefox

right-click on the page choose Web Developer from the list, then Tools

Select Validate HTML To Validate a Local HTML File: Open your web page in Firefox

on the keyboard, press and hold ALT - SHIFT – L Both options will give you a validation report using the W3C Validator. You can view the error messages by scrolling down the page.Sample Error Messages FATAL ERROR No DOCTYPE specified!" I could not parse this document, because it does not include a DOCTYPE Declaration. A DOCTYPE Declaration is mandatory for most current markup languages and without such a declaration it is impossible to validate this document."  

This will occur if you have a typo somewhere in your DOCTYPE statement. You should always copy and paste the DOCTYPE statement from a reliable source!

 

Error statement:

"Line 16, column 6: end tag for "head" which is not finished (explain...).

< ⁄ head >"

 

You look at your < head > tags and see that they are done correctly....and wonder why is it giving you this message about the head tag. This will occur if you forget to put in a <title> tag in your head section of your page. Even though the omitted <title> tag is the problem, the validator comments on it by saying that the head element isn't finished. That means that it is missing a required element, like the title tag. So, in this case, you would have to look at codes ABOVE the < ⁄ head > tag to find the error.

 

Error statement:

"Line 15, character "<" is the firs