In Search of eXtensibility

The standard for code in our class this semester will be XHTML 1.1, which is similar to the XHTML 1.0-Strict we used in ITD 110 — all the deprecated stuff is gone.  In case you’re new to XHTML, here are the main differences compared to HTML:

  •  The page must start with an appropriate prolog.  (Check the textbook, section 2.3, for details.)
  • All tags and attribute names must be in lower case.
  • All attribute values must be enclosed in quotation marks.
  • Every attribute must have a value.  (For example, <input type=”radio” selected=”selected”> instead of <input type=radio selected>.)
  • Every tag must be closed.  (For example, <p>Some text…</p>, or <hr />, or <img src=…  />.)
  • Tags may be nested, but should never overlap.  (For example:  <p><b><i>Some text</i></b></p> is correct;  putting the  close tags in any other order is incorrect.)

All code submitted, either for homework or projects, should be successfully validated.  Three ways to validate your code (listed from easiest to hardest):

  1. In Opera, right-click on the page (but not on an image or a link) and then click on Validate.   Or press Ctrl+Alt+V.
  2. In Firefox, install the Web Developer extension (which is a good idea for this class, for many reasons).  Then, while viewing the page, click on Tools | Validate HTML or press Ctrl+Shift+H (if you’re viewing a page on a web server) or Tools | Validate Local HTML or Ctrl+Shift+A (if you’re directly viewing a page on your own system).
  3. Visit the W3C Validator page and follow the instructions there.

Happy coding.