Even with indenting, keeping track of nested divs can drive you blind. I was thinking of putting the div id in the end div as a property name. Seems to me it should be legal, but will some browser (probably IE) choke on it? Since there isn’t really a property I don’t list it since that saves typing, and since it’s a property name I don’t have to type quotes. I imagine this would throw an error on XHTML, but I avoid that anyway.
[INDENT] <div id=‘inside’>
It’s just asking for trouble, if nothing else. You could do this instead:
</div>[COLOR="#FF0000"]<!-- end inside -->[/COLOR]
</div>[COLOR="#FF0000"]<!-- end container -->[/COLOR]
I know the W3C specs aren’t the easiest reading, but my take on
Attributes for an element are expressed inside the element’s start tag.
- that’s start tag, not end tag.
end tags consist of the following parts, in exactly the following order:
A “<” character.
A “/” character
The element’s tag name.
Optionally, one or more space characters.
A “>” character.
- nothing about having “extra” characters in it being OK.