Get Set Up
- Copy the XHTML folder from the Outbox.
- Paste it into your root folder.
- Rename it "lastname XHTML", where lastname is your actual last name.
In the XHTML folder, you will find
- A fresh copy of Tony's "Segway'n USA" Web site
- A fresh copy of the "Head First Lounge" Web site
- The XHTML lesson in PDF format
Exercise 1 [p.276]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
- Read pages 265-276 of the Lesson.
- Open XHTML/journal/journal.html.
- Change your DOCTYPE from HTML 4.01 Strict to XHTML 1.0 Strict. Copy and paste it from above.
- Add the xmlns, lang and xml:lang attributes to your <html> opening tag. Copy and paste it from above.
- Change the ending ">" characters on your empty elements to " />":
- <meta> to <meta />
- <img> to <img />
- <br> to <br />
- Save and test journal.html in the browser.
Exercise 2 [p.278]
- Read pages 277-278 of the Lesson.
- Test the following pages at http://validator.w3.org:
- lounge/lounge.html
- journal/journal.html
- If you see any errors, check your typing, get them fixed, and try again.
Exercise 3
- Let's update your own Web page:
- Copy your "lastname site" folder.
- Paste it into your "lastname XHTML" folder.
- Open your "index.html" file in Notepad.
- Update all the code using the rules for HTML 4.01 Strict in the HTML 20 lesson.
- Validate the page at http://validator.w3.org.
- If you see any errors, check your typing, get them fixed, and try again.
- Update all the code using the additional rules for XHTML in this lesson.
- Validate the page at http://validator.w3.org.
- If you see any errors, check your typing, get them fixed, and try again.
Turn in Your Files
- In My Documents, navigate down into your root folder (the one with your last name).
- Right-click on your "lastname XHTML" folder and select Copy.
- Navigate to the Inbox.
- Right-click on the "XHTML" folder and select Paste.
Source: "Head First HTML: with CSS & XHTML" by Elisabeth Freeman and Eric Freeman