in reply to & url question

Just for the record, if you want your XHTML to validate, you can't just use & in linked urls. You have to actually use & or the w3c validator complains. So if you are linking a url like this: http://domain/link.cgi?id=5&other_var=9, to get it to validate you have to do: http://domain/link.cgi?id=5&other_var=9.

Replies are listed 'Best First'.
Re^2: & url question
by Anonymous Monk on May 25, 2005 at 06:12 UTC
    Not exactly right. You have to write &-s as &-s in (X)HTML _only_. It's another coding: HTML parameter value coding.

    <a href="index.cgi?name=AT%26T&amp;id=1">...</a>

    The value of the link's href parameter (the URL, what you will see in the browser's location bar) will be "index.cgi?name=AT%26T&id=1", the value of name will be AT&T, and the value of id will be 1.