I use variables in some links on my page. I need to send these variables so
I can change the color of the links in the navbar when the user is on that
page. If you click around on the site you will see the links in the navbar
change:
http://www.clearpointsystems.com/
When I try to validate the page at http://validator.w3.org/ I get the
following error:
Line 120, column 42: an attribute value must be a literal unless it contains
only name characters
<p><span class=blulink>< a href=index.php? 'home'>Home Page</a></span></p>
You have used a character that is not considered a "name character" in an
attribute value. Which characters are considered "name characters" varies
between the different document types, but a good rule of thumb is that
unless the value contains only lower or upper case letters in the range a-z
you must put quotation marks around the value. In fact, unless you have
extreme file size requirements it is a very very good idea to always put
quote marks around your attribute values. It is never wrong to do so, and
very often it is absolutely necessary.
If I try to put quotes around the variables, they no longer work:
<p><span class=blulink>< a href=index.php? "home">Home Page</a></span></p>
[does not work]
How can I use these variables and still have valid HTML code?
Thanks in advance.