Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

XHTML Guidelines

Now that you've learned everything there is to know about XHTML, here are some specific quality guidelines to keep in mind, for creating professional quality XHTML pages.

Don't forget to use a <title>

A page's title is the most important element of a quality Web page - this short descriptive text shows up in a browser's title bar, bookmarks, and plays an important part in helping people find your information. Here are some specific tips to follow when choosing a page title:

  • Be Descriptive: Avoid ambiguous titles like "chapter 1" (chapter 1 of what?) - be specific, for example "XHTML Quality Guidelines".
  • Be Brief: Because only 60 to 80 characters are displayed in many browser window titles, menus, bookmarks, etc.; feel free to provide a more detailed title in the top level heading(s) of your document.

Don't use "click here" as link text

When calling the user to action, use brief but meaningful link text that provide some information when read out of context, explains what the link offers, doesn't talk about mechanics and is not a verb phrase. For example:

Code Sample — browser view

Use standard redirects: don't break the back button!

Don't use the refresh tag for redirecting the user to another page - it breaks the browser's back button! Specifically, you should not use "refresh" techniques like this:

Code Sample:
<META HTTP-EQUIV=REFRESH CONTENT="1; URL=http://www.example.org/newpage/">
view code in new window.
Download code sample on your computer.

Why? because this often breaks the "back" button. Imagine that the user presses the "back" button, the refresh would work again, and the user would bounce forward. The user will most likely get very annoyed, and close the window, which is probably not what you, as the author of this page, want. Use standard HTTP redirects instead!

The REFRESH meta-tag is meant to create a redirection within the document. The User Agent (be it a browser or the Markup Validator) is expected to download the page, look at its contents, find the "refresh" instruction, wait the specified amount of time (which could just happen to be "0" seconds for an "immediate" refresh, but really could be anything), and then proceed to the new address.

An "HTTP Redirect" on the other hand acts much more directly because it is done within another layer. When the User Agent (i.e. a browser or the validator) first contacts the server and requests the document, the _server_ itself, having been configured to redirect the document to another address, replies to the user-agent that it should instead look at the new address.

An "HTTP Redirect" is also a richer way to redirect because it gives the User Agent more information than just the new address: the server also gives some information about the purpose and type of redirection, which allows the User Agent to behave differently depending on the type of redirect. The different types of HTTP redirects are as follow (with the relevant HTTP status code sent by the server) are the Permanent Redirect (HTTP 301), the Temporary Redirect (307), and the undefined redirect (302).

Start Of Section: XHTML Tutorial Start of Section:
XHTML Tutorial
Previous Page: XHTML 1.1 Previous Page:
XHTML 1.1
Next Page:
XHTML FAQ
Next Page: XHTML FAQ
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.