"& did not start a character reference. (& probably should have been escaped as &.)" w3c markup

user1999828 picture user1999828 · Apr 12, 2013 · Viewed 25.3k times · Source

I'm using w3c markup validator. I get this error:

Line 169, Column 60: & did not start a character reference. (& probably should have been escaped as &.)
    <a href="index.php?option=com_content&view=article&id=6&Itemid=4">

If I use &amp instead of &, I can't pass values to next page. Someone please help me. Thanks in advance

Answer

codebox picture codebox · Apr 12, 2013

Did you include the semi-colon after &amp? Your link should be

<a href="index.php?option=com_content&amp;view=article&amp;id=6&amp;Itemid=4">

Note that if you paste this url into the address bar of your browser it won't work - the browser converts the &amp; into & when you click the link in the page.