NASA Logo, National Aeronautics and Space Administration

National Aeronautics and Space Administration

Goddard Space Flight Center

One NASA Look and Feel, Web Standards to the rescue.

Web Standards to the rescue. One NASA Look and Feel CSS TEMPLATES

Building Your Site

What is XHTML 1.0?

XHTML is the current markup standard on the web, it replaces HTML 4.0. You can think of it as a step closer to XML. Basically, XHTML is a more strict and structured form of HTML, and a much less forgiving language than HTML 4.0; especially when using it with stylesheets. Jeffrey Zeldman does a much better job of describing XHTML in his book, Designing with Web Standards, than I do. You can find all the information you ever wanted to know about XHTML in chapters 5 and 6 (pages 141-172).

Writing XHTML is not hard. If you can write HTML you will have no problems with XHTML. The hardest part will be breaking a few old habits. One very important thing to remember when writing XHTML, use the correct tags to properly mark-up your code. For instance, if it's a paragraph, surround it with paragraph tags. Don't just drop it on the page and put two break tags after it.

The Rules of XHTML 1.0

The first two rules have been take care of in the templates. The other rules pertain to how you will insert content.

  1. Use the proper DOCTYPE and namespace on your pages. (this has already been done on the template pages). If you are curious what this is all about, there is a lot of information on the web about it.
  2. Declare the content type in the META tags. (this has already been done on the template pages).
  3. All tag element and attribute names must be in lowercase.
  4. All attributes must have values, and those values must be quoted.
  5. Close ALL tags, even empty ones. To close an empty tag you add a space and a slash before the close.
    Example: <img src="flower.gif" alt="flower" />
  6. Properly nest all of your code.
    Example:<p><b>This is correct</b></p>
    Example:<b><p>This is INCORRECT</b></p>
  7. No double dashes within a comment tag.
  8. encode all ampersand and less-than signs with &amp; and &lt;

Enough of this boring XHTML stuff, it's time to start Modifying the Nav Bar.

+ Home

Building Your Site

NASA Fact

Insert a NASA fact here. Feel free to use a server side include or a back-end rotater.

NASA logo