Comment on JQuery 1.4 and Malformed JSONparentComments−robryan16yYeah saw some code yesterday it's a wonder a browser accepts <LI><br> <LI><br> <LI><br>It's stupid how a browser will parse just about anything.−bodhi16yExcept that your example is valid HTML 4.01/5. Closing tags are optional.Also, "Be conservative in what you emit, and liberal in what you accept" - Postel's Law: http://en.wikipedia.org/wiki/Robustness_principle[edit]: I'm incorrect, some closing tags are optional, </li> being one of them. for HTML5: http://www.whatwg.org/specs/web-apps/current-work/#generate-...−robryan16ymmm bad example then, also according to the spec it's valid to have a <li> without a <ul> or related tag, didn't know that
Comments
Yeah saw some code yesterday it's a wonder a browser accepts <LI><br> <LI><br> <LI><br>
It's stupid how a browser will parse just about anything.
Except that your example is valid HTML 4.01/5. Closing tags are optional.
Also, "Be conservative in what you emit, and liberal in what you accept" - Postel's Law: http://en.wikipedia.org/wiki/Robustness_principle
[edit]: I'm incorrect, some closing tags are optional, </li> being one of them. for HTML5: http://www.whatwg.org/specs/web-apps/current-work/#generate-...
mmm bad example then, also according to the spec it's valid to have a <li> without a <ul> or related tag, didn't know that