Convert HTML to XHTML – the ampersand

An ampersand (& – the “and” symbol above the 7 on your keyboard) within an attribute value must use its character entity reference.

For example, the URL below containing the & symbol:

<.a href="http://www.domain.com/cgi-bin/ class.pl?saturday&night&live".>foo<./a>

must be rewritten like this:


<a href="http://www.domain.com/cgi-bin/
class.pl?saturday&night&live">foo</a>

If the ampersand symbol is not used in the URL your web page will not vaildiate for correct XHTML.

Speak Your Mind

*