& and &

J

John Timney \(MVP\)

& is an & sign when encoded for correct presentation in text so in html
you would say Bill & Ben in your code and it would be presented as Bill
& Ben in the browser. You would only use it in a URL if you wanted to pass
Bill&Ben as an argument. The & sign on the URL is for gluing querystring
parameters together.

Regards

John Timney (MVP)
http://www.johntimney.com
http://www.johntimney.com/blog
 
P

Patrice

The proper character for an url is & BUT in an HTML document the & character
introduces a character entity. For this reason, when a link is written
inside an HTML document it's better to use & to avoid a possible
confusion. Note that this is an HTML issue, in particular the server will
still see just & (as this is what & means in an HTML document).

See :
http://htmlhelp.com/tools/validator/problems.html.en#amp
 
M

Michael Nemtsev

Hello Tony,

Just to add to partice, read "HTML Document Representation" http://www.w3.org/TR/html4/charset.html
about HTML/URL Encoding

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

T> I see that many pages have & in querystring instead &. What is
T> difference? Can I put page link (url)
T> www.mysite.com/mypage.aspx?lang=EN&ID=15 or I need to write
T> www.mysite.com/mypage.aspx?lang=EN&ID=15
T> What is difference between & and & and what is better?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top