W3C home > Mailing lists > Public > www-validator@w3.org > October 2001

Re: asp URLs

From: Dmitri Klimenko <dg@humorist.ru>
Date: Tue, 16 Oct 2001 13:12:24 -0400
Message-ID: <000701c15665$b9eac120$455dd1d8@CR194084C>
To: "Jarrod Dieppa" <JDIEPPA@mbakercorp.com>
Cc: <www-validator@w3.org>
Ampersands have special meaning in HTML, they are used to encode entities
(like &copy; , &quot;)
When an ampersand must be used for some other purpose in a page, for
example, as a parameter separator in a query string, it should be encoded as
&amp; so instead of
<a href="page.asp?a=b&c=d">page</a>
you should write
<a href="page.asp?a=b&amp;c=d">page</a>
Weird as it seems at first, this is the correct way of writing query
strings, it is valid in terms of HTML, and works in all compliant browsers.

> I have a bunch of ASP pages that do not validate to the HTML 4.01
transitional standard because they have hyperlinks with an ampersand in the
URL. The validator says that whatever is after the ampersand is an unknown
entity. I was wondering if this is just a limitation of the validator or can
I really not use ampersands in a hyperlink url? If I can't, is there a way
around it?
Received on Tuesday, 16 October 2001 13:13:03 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:31 UTC