I am having a very strange problem with HTML.
On my backend, the problem part is like this.
<div class="content">
<a href="detail.html"></a>
<img src="assets/img/tmp/img.png" alt=""></img>
</div><!-- /.content -->
On the brower(Google chrome) view source
<div class="content"> <a href="detail.html"/> <img src="assets/img/tmp/img.png" alt=""></img> </div><!-- /.content -->
but when inspect element
<div class="content">
<a href="detail.html">
<img src="assets/img/tmp/img.png" alt=""></img></a>
</div><!-- /.content -->
as you can see the tag is interpreted differently, and it caused a lot of problems, any ideas why this happens?
but when i add <a href="detail.html">><!-- required for FF3 and Opera --></a>
in backend the problem solves.However, instead of put this everywhere, is there any other way i can solve it
I am using apache tile in spring mvc with html header like below
<jsp:output doctype-root-element="HTML" doctype-system="about:legacy-compat" />