NHS Designs

Resources

Here's the lesson in PDF format:

XHTML [5MB]

Here are the ZIPped Web sites for Tony's Journal and the Head First Lounge:

xhtml.zip [144KB]

Web Design
XHTML

Get Set Up

  1. Copy the XHTML folder from the Outbox.
  2. Paste it into your root folder.
  3. 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">

  1. Read pages 265-276 of the Lesson.
  2. Open XHTML/journal/journal.html.
  3. Change your DOCTYPE from HTML 4.01 Strict to XHTML 1.0 Strict. Copy and paste it from above.
  4. Add the xmlns, lang and xml:lang attributes to your <html> opening tag. Copy and paste it from above.
  5. Change the ending ">" characters on your empty elements to " />":
    • <meta> to <meta />
    • <img> to <img />
    • <br> to <br />
  6. Save and test journal.html in the browser.

 

Exercise 2 [p.278]

  1. Read pages 277-278 of the Lesson.
  2. Test the following pages at http://validator.w3.org:
    • lounge/lounge.html
    • journal/journal.html
  3. If you see any errors, check your typing, get them fixed, and try again.

 

Exercise 3

  1. Let's update your own Web page:
    1. Copy your "lastname site" folder.
    2. Paste it into your "lastname XHTML" folder.
  2. Open your "index.html" file in Notepad.
  3. Update all the code using the rules for HTML 4.01 Strict in the HTML 20 lesson.
    1. Validate the page at http://validator.w3.org.
    2. If you see any errors, check your typing, get them fixed, and try again.
  4. Update all the code using the additional rules for XHTML in this lesson.
    1. Validate the page at http://validator.w3.org.
    2. If you see any errors, check your typing, get them fixed, and try again.

 

Turn in Your Files

  1. In My Documents, navigate down into your root folder (the one with your last name).
  2. Right-click on your "lastname XHTML" folder and select Copy.
  3. Navigate to the Inbox.
  4. Right-click on the "XHTML" folder and select Paste.

 

Source: "Head First HTML: with CSS & XHTML" by Elisabeth Freeman and Eric Freeman

 


ABOUT MRS. PEDERSEN · EMAIL MRS. PEDERSEN
resources · copyright information · Natomas High School Design Department