Because any & in HTML should be encoded as & . This way, any & on its own will be interpreted as the beginning of the HTML object, and browsers will try to correct the error (the parser may try to interpret the object if the character is out of range, such as a space character).
Whenever you use & in your HTML, encode it as & .
source share