Toni Michel Caubet
Toni Michel Caubet

Reputation: 20163

How to write url's in achor links so doesn't fire errors/warings @ w3c validator

just a simple link with parameters

<a href="http://domainame.com/?bla=ble&bli=blo">hey!</a>

would make the w3c validator jump two errors, one for the equeal (=) and one for the and (&)

Error Line 1, Column 43: reference to entity "bli" for which no system identifier could be generated




This is usually a cascading error caused by a an undefined entity reference or use of an unencoded ampersand (&) in an URL or body text. See the previous message for further details.
Info Line 1, Column 39: entity was defined here

How can i write them and get 0 errors/warnings?

Upvotes: 3

Views: 1007

Answers (2)

Ibu
Ibu

Reputation: 43810

i think you just need to escape the characters

For example = will be %3D and & will be &amp;

Read more here HTML url encoding

Upvotes: 0

Madara&#39;s Ghost
Madara&#39;s Ghost

Reputation: 174957

The equal sign throws no errors. Replace the & with &amp; like so:

<a href="http://domainame.com/?bla=ble&amp;bli=blo">hey!</a>

Upvotes: 2

Related Questions