HTML 20: Standards, Compliance and All that Jazz
Get Set Up
- Copy the HTML 20 folder from the Outbox.
- Paste it into your root folder.
In the HTML 20 folder, you will find
- A fresh copy of the Head First Lounge Web site
- The HTML 20 lesson in PDF format
Exercise 1 [p.232]
- Read pages 223-232 of the Lesson.
- Add a DOCTYPE to the Lounge's Web pages:
- lounge.html
- directions.html
- elixir.html
- Save and test each HTML file in the browser.
Exercise 2 [p.234]
- Read pages 233-236 of the Lesson.
- Go to http://validator.w3.org.
- Click the tab for Validate by File Upload.
- Click on the Browse... button.
- Navigate to your lounge.html file and click Open.
- Click on the Check button.
- Review the results.
Exercise 3 [p.237]
- Read pages 237-238 of the Lesson.
- Fix the error in the <img> element.
- Try validating the page again.
- Review the results.
Exercise 4 [p.241]
- Read pages 239-242 in the Lesson.
- Add the <meta> element to lounge.html.
- Save the file and test it in a browser.
- Try validating the page again at http://validator.w3.org.
- Review the results.
Exercise 5 [p.246]
- Read pages 243-246 in the Lesson.
- Change the DOCTYPE to strict in lounge.html:
- Remove the word transitional.
- Replace loose.dtd with strict.dtd
- Use the validator again to see if lounge.html is compliant with Strict HTML 4.01.
- Review the results.
Exercise 6 [p.249]
- Read pages 247-250 in the Lesson.
- Add a <p> element around the <img> element.
- Try validating the page again at http://validator.w3.org.
- Review the results.
Exercise 7 [p.251]
- Read page 251 in the Lesson.
- Add the strict DOCTYPE and the <meta> tag to the other pages:
- directions.html
- elixir.html
- Try validating them.
- Do they validate? If not, fix them so that they do.
Exercise 8 [p.260] - EXTRA CREDIT
- Read pages 252-260 in the Lesson.
- Locate all the errors in the HTML code on page 260.
- Type the correct code in Notepad.
- Save the file in the HTML 20 folder as webville.html.
- You may test your file at http://validator.w3.org to help you debug it.
- You may not remove or change the DOCTYPE.
Turn in Your Files
- In My Documents, navigate down to your root folder (the one with your last name).
- Right-click on your root folder and select Copy.
- Navigate to the Inbox.
- Right-click on the "HTML 20" folder and select Paste.
Source: "Head First HTML: with CSS & XHTML" by Elisabeth Freeman and Eric Freeman
