Are browsers permitted to render <li>s in any order?
- by ctford
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> or an <ul> 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.