Web Publishing III
Is Your HTML Up To Code?
HTML is a very precise markup language, and it's easy to make mistakes. Fortunately, there are tools available to help you diagnose problems and create error-free code. In this exercise you'll use the W3C's validation service to validate your web page.
- Go to the HTML Validation Service site. (Note: this link will open in a new window.)
- Paste any URL into the address box, and validate the page:
(Hint: to copy the url, point to it with your mouse, right-click [Windows] or hold down the mouse button [MacOS], and select "Copy Shortcut" or "Copy Link Location" from the menu.)
- Review the results. What problems were reported? How would you fix them? [see corrected code]
- Using SFTP software, download a copy of the page you worked on in Web Publishing II to the C:Guest folder on your computer.
- Open the file you just downloaded in your text editor, and in your browser.
- Now validate your own web page (hint: use the "Local File" option this time). Oops! You may have received the following warning:
"I was not able to extract a character encoding labeling from any of the valid sources for such information. Without encoding information it is impossible to validate the document."You can fix this by adding the following statement in the head of your HTML document:
- Save your file and validate it again.
- How many errors did it find? Fix the errors, save the page, and validate it again. Repeat until perfect.
- Publish your page to the server, and test it in your browser.
You're done - return to the workshop outline.