Are browsers permitted to render <ol>s in any order?

Posted by ctford on Stack Overflow See other posts from Stack Overflow or by ctford
Published on 2010-05-27T10:00:58Z Indexed on 2010/05/27 10:11 UTC
Read the original article Hit count: 136

Filed under:
|

As I understand the XML spec, the significance of the order of child elements is not guaranteed. XML parsers tend to keep child elements in the same order as they occur in the XML document, but they are under no obligation to do so.

If that's so, then are browsers free to render the <li>s in an <ol> in a different order than they occur in the XHTML? Or is it specified in the XHTML spec somewhere that order has to be preserved?

I realise that all major browsers will respect the order of my <li>s. I'm just interested in the academic question of whether or not they are technically obliged to.

© Stack Overflow or respective owner

Related posts about Xml

Related posts about XHTML