uzay95
uzay95

Reputation: 16632

`A` tag is not well-formed but why?

Firebug is showing this HTML tag as "not well-formed":

<a id="aHarita" target="_blank" style="margin-left: 5px;" href="http://maps.google.com/maps?q=40.879236,29.386641&num=1&t=h&sll=40.879132,29.386962&sspn=0.006295,0.006295&ie=UTF8&ll=40.879317,29.386641&spn=0.003022,0.006947&z=18" >

Where is the problem?

Upvotes: 0

Views: 256

Answers (5)

munissor
munissor

Reputation: 3785

Maybe you have to replace & with &amp; in your href attribute.

Upvotes: 2

Matt Gibson
Matt Gibson

Reputation: 38238

There's a few things wrong with that, depending on your doctype. Run the page through http://validator.w3.org to get details on the validation failures. This is a good first stop for any validation problems, and should be useful for the future.

Upvotes: 3

Gumbo
Gumbo

Reputation: 655239

You need to replace the & inside the attribute value by a reference like &amp; or &#38;, so:

<a id="aHarita" target="_blank" style="margin-left: 5px;" href="http://maps.google.com/maps?q=40.879236,29.386641&amp;num=1&amp;t=h&amp;sll=40.879132,29.386962&amp;sspn=0.006295,0.006295&amp;ie=UTF8&amp;ll=40.879317,29.386641&amp;spn=0.003022,0.006947&amp;z=18" >

Upvotes: 3

Andrei Serdeliuc ॐ
Andrei Serdeliuc ॐ

Reputation: 5878

"target" is not a valid attribute for "a" tags.

Upvotes: 0

Darin Dimitrov
Darin Dimitrov

Reputation: 1038780

The & in the href should be html encoded: &amp;.

Upvotes: 2

Related Questions