Valid ampersand when writing URLs in HTML

Always use & in place of & when writing URLs in HTML.

Example of invalid ampersand for URL in HTML:

<a href="test.php?var1=3&var2=6&var3=10">...</a>

The correct usage:

<a href="test.php?var1=3&amp;var2=6&amp;var3=10">...</a>

To validate for markup, please use W3C Markup Validator.

Related

This entry was posted in WordPress and tagged , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>