24 Oct

firefox not properly parsing XML/XHTML ?

Look at these examples – semantically, they are exactly the same:

<ul><li />one<li>two</li><li />three</ul>
<ul><li></li>one<li>two</li><li></li>three</ul>

In both cases, they are invalid, but Firefox renders one of them correctly and not the other…

example one

  • one
  • two
  • three

example two

  • one

  • two
  • three

Interesting! Noticed while explaining why ‘ /’ is used at the end of self-closing elements in XHTML.