Reputation: 3419
Assuming I have the following link:
<a href='http://google.com/bla'>http://google.com/bla</a>
Is this one also valid?
<a href='http://google.com/bla'>http://google.com/bla</a>
It works in Firefox, but I'm not sure if this is standardized behavior. I hope the question isn't super dumb!
Upvotes: 4
Views: 4950
Reputation: 54729
Yes, it is perfectly valid to do that. In fact, the ampersand (&
) character must be escaped into &
in order to be valid HTML, even inside the href
attribute (and all attributes for that matter).
Upvotes: 7